diff options
Diffstat (limited to 'examples/docs/src/components/PageContent/PageContent.astro')
-rw-r--r-- | examples/docs/src/components/PageContent/PageContent.astro | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/docs/src/components/PageContent/PageContent.astro b/examples/docs/src/components/PageContent/PageContent.astro index 49a74ab70..c7c66c7fc 100644 --- a/examples/docs/src/components/PageContent/PageContent.astro +++ b/examples/docs/src/components/PageContent/PageContent.astro @@ -1,8 +1,16 @@ --- +import type { Frontmatter } from '../../config'; import MoreMenu from '../RightSidebar/MoreMenu.astro'; import TableOfContents from '../RightSidebar/TableOfContents'; +import type { MarkdownHeading } from 'astro'; -const { frontmatter, headings, githubEditUrl } = Astro.props; +type Props = { + frontmatter: Frontmatter; + headings: MarkdownHeading[]; + githubEditUrl: string; +}; + +const { frontmatter, headings, githubEditUrl } = Astro.props as Props; const title = frontmatter.title; --- @@ -10,7 +18,7 @@ const title = frontmatter.title; <section class="main-section"> <h1 class="content-title" id="overview">{title}</h1> <nav class="block sm:hidden"> - <TableOfContents client:media="(max-width: 50em)" {headings} /> + <TableOfContents client:media="(max-width: 50em)" headings={headings} /> </nav> <slot /> </section> |