mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat(heading): add Heading
and Section
components (#1961)
This commit is contained in:
parent
42e50261a8
commit
76210d68d4
11 changed files with 287 additions and 2 deletions
23
types/Heading/Section.svelte.d.ts
vendored
Normal file
23
types/Heading/Section.svelte.d.ts
vendored
Normal 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: {} }
|
||||
> {}
|
Loading…
Add table
Add a link
Reference in a new issue