docs: move edit date to footer (#11667)

* docs: move edit date to footer

* fix build error
This commit is contained in:
Shahed Nasser
2025-02-28 16:27:42 +02:00
committed by GitHub
parent 228b7b608d
commit bf67f69f45
23 changed files with 183 additions and 121 deletions
@@ -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>
)
}