feat(heading): add Heading and Section components (#1961)

This commit is contained in:
Eric Liu 2024-04-21 14:27:26 -07:00 committed by GitHub
commit 76210d68d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 287 additions and 2 deletions

23
types/Heading/Section.svelte.d.ts vendored Normal file
View file

@ -0,0 +1,23 @@
import type { SvelteComponentTyped } from "svelte";
export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
export interface SectionProps {
/**
* Specify the level the section should start at.
* @default 1
*/
level?: SectionLevel;
/**
* Specify the tag name
* @default "section"
*/
tag?: keyof HTMLElementTagNameMap;
}
export default class Section extends SvelteComponentTyped<
SectionProps,
Record<string, any>,
{ default: {} }
> {}