Files
medusa-store/www/packages/docs-ui/src/components/EditButton/index.tsx
Shahed Nasser 0a37675f0e docs: add routing page (#9550)
- Add a new homepage to `book` project for the routing page
- Move all main doc pages to be under `/v2/learn` (and added redirects + fixed links across docs)
- Other: add admin components to resources dropdown + fixes to search on mobile.

Closes DX-955

Preview: https://docs-v2-git-docs-router-page-medusajs.vercel.app/v2
2024-10-18 08:24:34 +00:00

25 lines
608 B
TypeScript

import React from "react"
import Link from "next/link"
import clsx from "clsx"
import { ArrowUpRightOnBox } from "@medusajs/icons"
type EditButtonProps = {
filePath: string
}
export const EditButton = ({ filePath }: EditButtonProps) => {
return (
<Link
href={`https://github.com/medusajs/medusa/edit/develop${filePath}`}
className={clsx(
"flex w-fit gap-docs_0.25 my-docs_2 items-center",
"text-medusa-fg-muted hover:text-medusa-fg-subtle",
"text-compact-small-plus"
)}
>
<span>Edit this page</span>
<ArrowUpRightOnBox />
</Link>
)
}