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

View file

@ -1,6 +1,6 @@
# Component Index
> 166 components exported from carbon-components-svelte@1.0.0-next.1.
> 168 components exported from carbon-components-svelte@1.0.0-next.1.
## Components
@ -63,6 +63,7 @@
- [`HeaderPanelLinks`](#headerpanellinks)
- [`HeaderSearch`](#headersearch)
- [`HeaderUtilities`](#headerutilities)
- [`Heading`](#heading)
- [`ImageLoader`](#imageloader)
- [`InlineLoading`](#inlineloading)
- [`InlineNotification`](#inlinenotification)
@ -109,6 +110,7 @@
- [`Row`](#row)
- [`Search`](#search)
- [`SearchSkeleton`](#searchskeleton)
- [`Section`](#section)
- [`Select`](#select)
- [`SelectItem`](#selectitem)
- [`SelectItemGroup`](#selectitemgroup)
@ -1852,6 +1854,28 @@ None.
None.
## `Heading`
### Types
```ts
export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
```
### Props
None.
### Slots
| Slot name | Default | Props | Fallback |
| :-------- | :------ | :---- | :------- |
| -- | Yes | -- | -- |
### Events
None.
## `ImageLoader`
### Props
@ -3177,6 +3201,31 @@ None.
| mouseenter | forwarded | -- |
| mouseleave | forwarded | -- |
## `Section`
### Types
```ts
export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
```
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :-------- | :------- | :--------------- | :------- | ---------------------------------------- | ---------------------- | ---------------------------------------------- |
| level | No | <code>let</code> | No | <code>SectionLevel</code> | <code>1</code> | Specify the level the section should start at. |
| tag | No | <code>let</code> | No | <code>keyof HTMLElementTagNameMap</code> | <code>"section"</code> | Specify the tag name |
### Slots
| Slot name | Default | Props | Fallback |
| :-------- | :------ | :---- | :------- |
| -- | Yes | -- | -- |
### Events
None.
## `Select`
### Props