docs: fix scroll top margin (#8605)
This commit is contained in:
@@ -10,15 +10,12 @@ const ReferencePage = async () => {
|
|||||||
return (
|
return (
|
||||||
<AreaProvider area={"admin"}>
|
<AreaProvider area={"admin"}>
|
||||||
<PageTitleProvider>
|
<PageTitleProvider>
|
||||||
<h1 className="!text-h2 block lg:hidden">
|
<h1 className="!text-h2 scroll-m-56 lg:pl-4" id="introduction">
|
||||||
Medusa V2 Admin API Reference
|
Medusa V2 Admin API Reference
|
||||||
</h1>
|
</h1>
|
||||||
<DividedLayout
|
<DividedLayout
|
||||||
mainContent={
|
mainContent={
|
||||||
<Section checkActiveOnScroll={true}>
|
<Section checkActiveOnScroll={true}>
|
||||||
<h1 className="!text-h2 hidden lg:block">
|
|
||||||
Medusa V2 Admin API Reference
|
|
||||||
</h1>
|
|
||||||
<AdminContentV2 />
|
<AdminContentV2 />
|
||||||
</Section>
|
</Section>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,24 +10,20 @@ const ReferencePage = async () => {
|
|||||||
return (
|
return (
|
||||||
<AreaProvider area={"store"}>
|
<AreaProvider area={"store"}>
|
||||||
<PageTitleProvider>
|
<PageTitleProvider>
|
||||||
<h1 className="!text-h2 block lg:hidden">
|
<h1 className="!text-h2 scroll-m-56 lg:pl-4" id="introduction">
|
||||||
Medusa V2 Store API Reference
|
Medusa V2 Store API Reference
|
||||||
</h1>
|
</h1>
|
||||||
<DividedLayout
|
<DividedLayout
|
||||||
mainContent={
|
mainContent={
|
||||||
<Section checkActiveOnScroll={true}>
|
<Section checkActiveOnScroll={true}>
|
||||||
<h1 className="!text-h2 hidden lg:block">
|
|
||||||
Medusa V2 Store API Reference
|
|
||||||
</h1>
|
|
||||||
<StoreContentV2 />
|
<StoreContentV2 />
|
||||||
</Section>
|
</Section>
|
||||||
}
|
}
|
||||||
codeContent={
|
codeContent={
|
||||||
<div className="mb-1 lg:mb-0">
|
<div className="mb-1 lg:mb-0 hidden lg:block">
|
||||||
<ClientLibrariesV2 />
|
<ClientLibrariesV2 />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
className="flex-col-reverse"
|
|
||||||
/>
|
/>
|
||||||
<Tags />
|
<Tags />
|
||||||
</PageTitleProvider>
|
</PageTitleProvider>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const config: DocsConfig = {
|
|||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
title: "Introduction",
|
title: "Introduction",
|
||||||
path: "",
|
path: "introduction",
|
||||||
loaded: true,
|
loaded: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export const MDXComponents: MDXComponentsType = {
|
|||||||
<h1
|
<h1
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"h1-docs [&_code]:!h1-docs [&_code]:!font-mono mb-docs_1 text-medusa-fg-base",
|
"h1-docs [&_code]:!h1-docs [&_code]:!font-mono mb-docs_1 text-medusa-fg-base",
|
||||||
|
props.id && "scroll-m-56",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
@@ -47,7 +48,7 @@ export const MDXComponents: MDXComponentsType = {
|
|||||||
<h2
|
<h2
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"h2-docs [&_code]:!h2-docs [&_code]:!font-mono mb-docs_1 mt-docs_4 text-medusa-fg-base",
|
"h2-docs [&_code]:!h2-docs [&_code]:!font-mono mb-docs_1 mt-docs_4 text-medusa-fg-base",
|
||||||
props.id && "group/h2",
|
props.id && "group/h2 scroll-m-56",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
@@ -73,7 +74,7 @@ export const MDXComponents: MDXComponentsType = {
|
|||||||
<h3
|
<h3
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"h3-docs [&_code]:!h3-docs [&_code]:!font-mono mb-docs_0.5 mt-docs_3 text-medusa-fg-base",
|
"h3-docs [&_code]:!h3-docs [&_code]:!font-mono mb-docs_0.5 mt-docs_3 text-medusa-fg-base",
|
||||||
props.id && "group/h3",
|
props.id && "group/h3 scroll-m-56",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -13,7 +13,12 @@ export const WideLayout = ({
|
|||||||
{...props}
|
{...props}
|
||||||
mainWrapperClasses={clsx(props.mainWrapperClasses, "mx-auto flex")}
|
mainWrapperClasses={clsx(props.mainWrapperClasses, "mx-auto flex")}
|
||||||
>
|
>
|
||||||
<main className="lg:max-w-wide-content relative mt-4 w-full flex-1 lg:mt-7">
|
<main
|
||||||
|
className={clsx(
|
||||||
|
"max-w-inner-content-xs sm:max-w-inner-content-sm md:max-w-inner-content-md",
|
||||||
|
"lg:max-w-wide-content relative mt-4 w-full flex-1 lg:mt-7"
|
||||||
|
)}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
{showPagination && <Pagination />}
|
{showPagination && <Pagination />}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -657,6 +657,9 @@ module.exports = {
|
|||||||
maximize: "maximize 500ms",
|
maximize: "maximize 500ms",
|
||||||
flash: "flash 1500ms 1",
|
flash: "flash 1500ms 1",
|
||||||
},
|
},
|
||||||
|
scrollMargin: {
|
||||||
|
56: "56px",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
base: [
|
base: [
|
||||||
|
|||||||
Reference in New Issue
Block a user