Compare commits
No commits in common. "e2ad0bb5f9aa06e0c91758ec9718d8756570915f" and "364c548aa806ac62121ca64d18c958764cd2f88d" have entirely different histories.
e2ad0bb5f9
...
364c548aa8
@ -1,40 +1,44 @@
|
|||||||
import type { JSXElement } from "solid-js";
|
import type { JSXElement } from "solid-js";
|
||||||
|
|
||||||
import { TableOfContents } from "@/partials/TableOfContents";
|
|
||||||
import { PrevNextLinks } from "@/components/PrevNextLinks";
|
import { PrevNextLinks } from "@/components/PrevNextLinks";
|
||||||
import { usePageContext } from "vike-solid/usePageContext";
|
import { usePageContext } from "vike-solid/usePageContext";
|
||||||
import { clientOnly } from "vike-solid/clientOnly";
|
import { clientOnly } from "vike-solid/clientOnly";
|
||||||
import { clock } from "solid-heroicons/outline";
|
import { clock } from "solid-heroicons/outline";
|
||||||
import { navigation } from "@/libs/navigation";
|
import { navigation } from "@/libs/navigation";
|
||||||
import { Prose } from "@/components/Prose";
|
import { Prose } from "@/components/Prose";
|
||||||
|
import { MDXProvider } from "solid-jsx";
|
||||||
import { Icon } from "solid-heroicons";
|
import { Icon } from "solid-heroicons";
|
||||||
|
|
||||||
|
import QuickLinks from "@/components/QuickLinks";
|
||||||
|
|
||||||
type DocsLayoutProps = {
|
type DocsLayoutProps = {
|
||||||
children: JSXElement;
|
children: JSXElement;
|
||||||
};
|
};
|
||||||
|
|
||||||
// const TableOfContents = clientOnly(() =>
|
const TableOfContents = clientOnly(() =>
|
||||||
// import("@/partials/TableOfContents").then((m) => m.TableOfContents),
|
import("@/partials/TableOfContents").then((m) => m.TableOfContents),
|
||||||
// );
|
);
|
||||||
|
|
||||||
export function DocsLayout(props: DocsLayoutProps) {
|
export function DocsLayout(props: DocsLayoutProps) {
|
||||||
const pageContext = usePageContext();
|
const {
|
||||||
|
exports: { frontmatter, readingTime },
|
||||||
|
} = usePageContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<MDXProvider components={{ QuickLinks, QuickLink: QuickLinks.QuickLink }}>
|
||||||
<div class="max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16 grow">
|
<div class="max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16 grow">
|
||||||
<article>
|
<article>
|
||||||
<DocsHeader
|
<DocsHeader
|
||||||
title={pageContext.exports.frontmatter?.title}
|
title={frontmatter?.title}
|
||||||
estimatedReadingTime={pageContext.exports.readingTime?.text}
|
estimatedReadingTime={readingTime?.text}
|
||||||
/>
|
/>
|
||||||
<Prose>{props.children}</Prose>
|
<Prose>{props.children}</Prose>
|
||||||
</article>
|
</article>
|
||||||
<PrevNextLinks />
|
<PrevNextLinks />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TableOfContents />
|
<TableOfContents fallback={null} />
|
||||||
</>
|
</MDXProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
app/pages/docs/Button.tsx
Normal file
5
app/pages/docs/Button.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const Button = () => {
|
||||||
|
return <span>OK</span>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Button;
|
||||||
Loading…
Reference in New Issue
Block a user