Skip to content

Commit 0c2e8b5

Browse files
committed
Add headings to the component.
1 parent d48ce33 commit 0c2e8b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/mdx/Heading.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ function Anchor({id, children}: {id: string; children: ReactNode}) {
5858
}
5959

6060
interface HeadingProps {
61-
level?: '2' | '3';
61+
level?: '2' | '3' | '4' | '5';
6262
id: string;
6363
props: any;
6464
}
6565

6666
export function Heading({level = '2', id, props}: HeadingProps) {
67-
let Component = `h${level}` as 'h2' | 'h3';
67+
let Component = `h${level}` as 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
6868
return (
6969
<Component {...props}>
7070
<Anchor id={id}>{props.children}</Anchor>

0 commit comments

Comments
 (0)