docs: move edit date to footer (#11667)
* docs: move edit date to footer * fix build error
This commit is contained in:
@@ -2,23 +2,29 @@ import React from "react"
|
||||
import Link from "next/link"
|
||||
import clsx from "clsx"
|
||||
import { ArrowUpRightOnBox } from "@medusajs/icons"
|
||||
import { EditDate } from "../EditDate"
|
||||
|
||||
type EditButtonProps = {
|
||||
filePath: string
|
||||
editDate?: string
|
||||
}
|
||||
|
||||
export const EditButton = ({ filePath }: EditButtonProps) => {
|
||||
export const EditButton = ({ filePath, editDate }: 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>
|
||||
<div className="flex flex-wrap gap-docs_0.5 mt-docs_2 text-medusa-fg-subtle">
|
||||
{editDate && <EditDate date={editDate} />}
|
||||
|
||||
<Link
|
||||
href={`https://github.com/medusajs/medusa/edit/develop${filePath}`}
|
||||
className={clsx(
|
||||
"flex w-fit gap-docs_0.25 items-center",
|
||||
"text-medusa-fg-subtle hover:text-medusa-fg-base",
|
||||
"text-compact-small-plus"
|
||||
)}
|
||||
>
|
||||
<span>Edit this page</span>
|
||||
<ArrowUpRightOnBox />
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user