Skip to content

Commit 76e28f3

Browse files
committed
docs: fix scroll-mt with TOC
1 parent 66801b4 commit 76e28f3

File tree

1 file changed

+7
-2
lines changed
  • apps/website/src/components/mdx-components

1 file changed

+7
-2
lines changed

apps/website/src/components/mdx-components/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export const components: Record<string, any> = {
2323
return (
2424
<h1
2525
{...props}
26-
class={[cn('mb-6 pt-6 text-3xl font-extrabold md:text-5xl', props.class)]}
26+
class={[
27+
cn('mb-6 scroll-mt-32 pt-6 text-3xl font-extrabold md:text-5xl', props.class),
28+
]}
2729
>
2830
<Slot />
2931
</h1>
@@ -46,7 +48,10 @@ export const components: Record<string, any> = {
4648
}),
4749
h3: component$<PropsOf<'h3'>>(({ ...props }) => {
4850
return (
49-
<h3 {...props} class={[cn('mb-6 mt-8 text-xl font-semibold', props.class)]}>
51+
<h3
52+
{...props}
53+
class={[cn('mb-6 mt-8 scroll-mt-32 text-xl font-semibold', props.class)]}
54+
>
5055
<Slot />
5156
</h3>
5257
);

0 commit comments

Comments
 (0)