mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
docs(component-index): fix description line breaks
This commit is contained in:
parent
c7f664c7fb
commit
af8e3b1631
2 changed files with 189 additions and 211 deletions
|
@ -231,9 +231,8 @@ import { AccordionItem } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :--------------------------------------------------------------------------- | :------------------- | :---------------- | :--------------------------------------------------------- |
|
| :-------------- | :------------------- | :---------------- | :---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| title | <code>string</code> | "title" | Specify the title of the accordion item heading |
|
| title | <code>string</code> | "title" | Specify the title of the accordion item heading. Alternatively, use the named slot "title" (e.g. <div slot="title">...</div>) |
|
||||||
| Alternatively, use the named slot "title" (e.g. <div slot="title">...</div>) |
|
|
||||||
| open | <code>boolean</code> | false | Set to `true` to open the first accordion item |
|
| open | <code>boolean</code> | false | Set to `true` to open the first accordion item |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the accordion item |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the accordion item |
|
||||||
| iconDescription | <code>string</code> | "Expand/Collapse" | Specify the ARIA label for the accordion item chevron icon |
|
| iconDescription | <code>string</code> | "Expand/Collapse" | Specify the ARIA label for the accordion item chevron icon |
|
||||||
|
@ -426,17 +425,15 @@ import { Button } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :---------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | :------------ | :---------------------------------------------------- |
|
| :--------------- | :----------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| kind | <code>"primary" | "secondary" | "tertiary" | "ghost" | "danger"</code> | "primary" | Specify the kind of button |
|
| kind | <code>"primary" | "secondary" | "tertiary" | "ghost" | "danger"</code> | "primary" | Specify the kind of button |
|
||||||
| size | <code>"default" | "field" | "small"</code> | "default" | Specify the size of button |
|
| size | <code>"default" | "field" | "small"</code> | "default" | Specify the size of button |
|
||||||
| hasIconOnly | <code>boolean</code> | false | Set to `true` for the icon-only variant |
|
| hasIconOnly | <code>boolean</code> | false | Set to `true` for the icon-only variant |
|
||||||
| icon | <code>typeof import("carbon-icons-svelte/lib/Add16").default</code> | -- | Specify the icon from `carbon-icons-svelte` to render |
|
| icon | <code>typeof import("carbon-icons-svelte/lib/Add16").default</code> | -- | Specify the icon from `carbon-icons-svelte` to render |
|
||||||
| iconDescription | <code>string</code> | -- | Specify the ARIA label for the button icon |
|
| iconDescription | <code>string</code> | -- | Specify the ARIA label for the button icon |
|
||||||
| tooltipAlignment | <code>"start" | "center" | "end"</code> | -- | Set the alignment of the tooltip relative to the icon |
|
| tooltipAlignment | <code>"start" | "center" | "end"</code> | -- | Set the alignment of the tooltip relative to the icon. `hasIconOnly` must be set to `true` |
|
||||||
| `hasIconOnly` must be set to `true` |
|
|
||||||
| tooltipPosition | <code>"top" | "right" | "bottom" | "left"</code> | -- | Set the position of the tooltip relative to the icon |
|
| tooltipPosition | <code>"top" | "right" | "bottom" | "left"</code> | -- | Set the position of the tooltip relative to the icon |
|
||||||
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element |
|
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Button let:props><div {...props}>...</div></Button>) |
|
||||||
| Props are destructured as `props` in the default slot (e.g. <Button let:props><div {...props}>...</div></Button>) |
|
|
||||||
| skeleton | <code>boolean</code> | false | Set to `true` to display the skeleton state |
|
| skeleton | <code>boolean</code> | false | Set to `true` to display the skeleton state |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the button |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the button |
|
||||||
| href | <code>string</code> | -- | Set the `href` to use an anchor link |
|
| href | <code>string</code> | -- | Set the `href` to use an anchor link |
|
||||||
|
@ -638,24 +635,20 @@ import { CodeSnippet } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :----------------------------------------------------------------------------- | :--------------------------------------------------- | :------------ | :--------------------------------------------------------------- |
|
| :-------------------- | :--------------------------------------------------- | :------------ | :-------------------------------------------------------------------------------------------------------- |
|
||||||
| type | <code>"single" | "inline" | "multi"</code> | "single" | Set the type of code snippet |
|
| type | <code>"single" | "inline" | "multi"</code> | "single" | Set the type of code snippet |
|
||||||
| code | <code>string</code> | -- | Set the code snippet text |
|
| code | <code>string</code> | -- | Set the code snippet text. Alternatively, use the default slot (e.g. <CodeSnippet>{`code`}</CodeSnippet>) |
|
||||||
| Alternatively, use the default slot (e.g. <CodeSnippet>{`code`}</CodeSnippet>) |
|
|
||||||
| expanded | <code>boolean</code> | false | Set to `true` to expand a multi-line code snippet (type="multi") |
|
| expanded | <code>boolean</code> | false | Set to `true` to expand a multi-line code snippet (type="multi") |
|
||||||
| hideCopyButton | <code>boolean</code> | false | Set to `true` to hide the copy button |
|
| hideCopyButton | <code>boolean</code> | false | Set to `true` to hide the copy button |
|
||||||
| wrapText | <code>boolean</code> | false | Set to `true` to wrap the text |
|
| wrapText | <code>boolean</code> | false | Set to `true` to wrap the text. Note that `type` must be "multi" |
|
||||||
| Note that `type` must be "multi" |
|
|
||||||
| light | <code>boolean</code> | false | Set to `true` to enable the light variant |
|
| light | <code>boolean</code> | false | Set to `true` to enable the light variant |
|
||||||
| skeleton | <code>boolean</code> | false | Set to `true` to display the skeleton state |
|
| skeleton | <code>boolean</code> | false | Set to `true` to display the skeleton state |
|
||||||
| copyButtonDescription | <code>string</code> | -- | Specify the ARIA label for the copy button icon |
|
| copyButtonDescription | <code>string</code> | -- | Specify the ARIA label for the copy button icon |
|
||||||
| copyLabel | <code>string</code> | -- | Specify the ARIA label of the copy button |
|
| copyLabel | <code>string</code> | -- | Specify the ARIA label of the copy button |
|
||||||
| feedback | <code>string</code> | "Copied!" | Specify the feedback text displayed when clicking the snippet |
|
| feedback | <code>string</code> | "Copied!" | Specify the feedback text displayed when clicking the snippet |
|
||||||
| feedbackTimeout | <code>number</code> | 2000 | Set the timeout duration (ms) to display feedback text |
|
| feedbackTimeout | <code>number</code> | 2000 | Set the timeout duration (ms) to display feedback text |
|
||||||
| showLessText | <code>string</code> | "Show less" | Specify the show less text |
|
| showLessText | <code>string</code> | "Show less" | Specify the show less text. `type` must be "multi" |
|
||||||
| `type` must be "multi" |
|
| showMoreText | <code>string</code> | "Show more" | Specify the show more text. `type` must be "multi" |
|
||||||
| showMoreText | <code>string</code> | "Show more" | Specify the show more text |
|
|
||||||
| `type` must be "multi" |
|
|
||||||
| showMoreLess | <code>boolean</code> | false | Set to `true` to enable the show more/less button |
|
| showMoreLess | <code>boolean</code> | false | Set to `true` to enable the show more/less button |
|
||||||
| id | <code>string</code> | -- | Set an id for the code element |
|
| id | <code>string</code> | -- | Set an id for the code element |
|
||||||
| ref | <code>null | HTMLPreElement</code> | null | Obtain a reference to the pre HTML element |
|
| ref | <code>null | HTMLPreElement</code> | null | Obtain a reference to the pre HTML element |
|
||||||
|
@ -733,9 +726,8 @@ type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
|
||||||
```
|
```
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------- | :------------ | :-------------------------------------------- |
|
| :------------ | :------------------------------------------------------------------------------------------------- | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element |
|
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Column let:props><article {...props}>...</article></Column>) |
|
||||||
| Props are destructured as `props` in the default slot (e.g. <Column let:props><article {...props}>...</article></Column>) |
|
|
||||||
| noGutter | <code>boolean</code> | false | Set to `true` to remove the gutter |
|
| noGutter | <code>boolean</code> | false | Set to `true` to remove the gutter |
|
||||||
| noGutterLeft | <code>boolean</code> | false | Set to `true` to remove the left gutter |
|
| noGutterLeft | <code>boolean</code> | false | Set to `true` to remove the left gutter |
|
||||||
| noGutterRight | <code>boolean</code> | false | Set to `true` to remove the right gutter |
|
| noGutterRight | <code>boolean</code> | false | Set to `true` to remove the right gutter |
|
||||||
|
@ -989,10 +981,9 @@ import { DataTable } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------------- | :-------------------------------------------------- | :------------ | :-------------------------------------------- |
|
| :----------- | :-------------------------------------------------- | :------------ | :------------------------------------------------------------------------------------------------ |
|
||||||
| headers | <code>{key: string; value: string;}[]</code> | -- | Specify the data table headers |
|
| headers | <code>{key: string; value: string;}[]</code> | -- | Specify the data table headers |
|
||||||
| rows | <code>Object[]</code> | -- | Specify the rows the data table should render |
|
| rows | <code>Object[]</code> | -- | Specify the rows the data table should render. keys defined in `headers` are used for the row ids |
|
||||||
| keys defined in `headers` are used for the row ids |
|
|
||||||
| size | <code>"compact" | "short" | "tall"</code> | -- | Set the size of the data table |
|
| size | <code>"compact" | "short" | "tall"</code> | -- | Set the size of the data table |
|
||||||
| title | <code>string</code> | "" | Specify the title of the data table |
|
| title | <code>string</code> | "" | Specify the title of the data table |
|
||||||
| description | <code>string</code> | "" | Specify the description of the data table |
|
| description | <code>string</code> | "" | Specify the description of the data table |
|
||||||
|
@ -1028,14 +1019,13 @@ import { DataTableSkeleton } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :-------------------------------------------------- | :-------------------------------------------------- | :------------ | :-------------------------------------------------------- |
|
| :---------- | :-------------------------------------------------- | :------------ | :-------------------------------------------------------------------------- |
|
||||||
| columns | <code>number</code> | 5 | Specify the number of columns |
|
| columns | <code>number</code> | 5 | Specify the number of columns |
|
||||||
| rows | <code>number</code> | 5 | Specify the number of rows |
|
| rows | <code>number</code> | 5 | Specify the number of rows |
|
||||||
| size | <code>"compact" | "short" | "tall"</code> | -- | Set the size of the data table |
|
| size | <code>"compact" | "short" | "tall"</code> | -- | Set the size of the data table |
|
||||||
| zebra | <code>boolean</code> | false | Set to `true` to apply zebra styles to the datatable rows |
|
| zebra | <code>boolean</code> | false | Set to `true` to apply zebra styles to the datatable rows |
|
||||||
| showHeader | <code>boolean</code> | true | Set to `false` to hide the header |
|
| showHeader | <code>boolean</code> | true | Set to `false` to hide the header |
|
||||||
| headers | <code>string[]</code> | -- | Set the column headers |
|
| headers | <code>string[]</code> | -- | Set the column headers. If `headers` has one more items, `count` is ignored |
|
||||||
| If `headers` has one more items, `count` is ignored |
|
|
||||||
| showToolbar | <code>boolean</code> | true | Set to `false` to hide the toolbar |
|
| showToolbar | <code>boolean</code> | true | Set to `false` to hide the toolbar |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
@ -1400,11 +1390,10 @@ type Files = string[];
|
||||||
```
|
```
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------- | :---------------------------------------- | :------------ | :--------------------------------------------------------- |
|
| :------------ | :---------------------------------------- | :------------ | :------------------------------------------------------------------------------------------------------- |
|
||||||
| accept | <code>string[]</code> | -- | Specify the accepted file types |
|
| accept | <code>string[]</code> | -- | Specify the accepted file types |
|
||||||
| multiple | <code>boolean</code> | false | Set to `true` to allow multiple files |
|
| multiple | <code>boolean</code> | false | Set to `true` to allow multiple files |
|
||||||
| validateFiles | <code>(files: Files) => Files</code> | -- | Override the default behavior of validating uploaded files |
|
| validateFiles | <code>(files: Files) => Files</code> | -- | Override the default behavior of validating uploaded files. The default behavior does not validate files |
|
||||||
| The default behavior does not validate files |
|
|
||||||
| labelText | <code>string</code> | "Add file" | Specify the label text |
|
| labelText | <code>string</code> | "Add file" | Specify the label text |
|
||||||
| role | <code>string</code> | "button" | Specify the `role` attribute of the drop container |
|
| role | <code>string</code> | "button" | Specify the `role` attribute of the drop container |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the input |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the input |
|
||||||
|
@ -1689,9 +1678,8 @@ import { Grid } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------------------------------------------------------------------------------ | :------------------- | :------------ | :-------------------------------------------- |
|
| :------------ | :------------------- | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element |
|
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Grid let:props><header {...props}>...</header></Grid>) |
|
||||||
| Props are destructured as `props` in the default slot (e.g. <Grid let:props><header {...props}>...</header></Grid>) |
|
|
||||||
| condensed | <code>boolean</code> | false | Set to `true` to use the condensed variant |
|
| condensed | <code>boolean</code> | false | Set to `true` to use the condensed variant |
|
||||||
| narrow | <code>boolean</code> | false | Set to `true` to use the narrow variant |
|
| narrow | <code>boolean</code> | false | Set to `true` to use the narrow variant |
|
||||||
| fullWidth | <code>boolean</code> | false | Set to `true` to use the fullWidth variant |
|
| fullWidth | <code>boolean</code> | false | Set to `true` to use the fullWidth variant |
|
||||||
|
@ -1724,14 +1712,13 @@ import { Header } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :----------------------------------------------------------------------------------- | :----------------------------------------- | :------------ | :--------------------------------------------- |
|
| :---------------- | :----------------------------------------- | :------------ | :-------------------------------------------------------------------------------------------------------------- |
|
||||||
| expandedByDefault | <code>boolean</code> | true | Set to `false` to hide the side nav by default |
|
| expandedByDefault | <code>boolean</code> | true | Set to `false` to hide the side nav by default |
|
||||||
| isSideNavOpen | <code>boolean</code> | false | Set to `true` to open the side nav |
|
| isSideNavOpen | <code>boolean</code> | false | Set to `true` to open the side nav |
|
||||||
| uiShellAriaLabel | <code>string</code> | -- | Specify the ARIA label for the header |
|
| uiShellAriaLabel | <code>string</code> | -- | Specify the ARIA label for the header |
|
||||||
| href | <code>string</code> | -- | Specify the `href` attribute |
|
| href | <code>string</code> | -- | Specify the `href` attribute |
|
||||||
| company | <code>string</code> | -- | Specify the company name |
|
| company | <code>string</code> | -- | Specify the company name |
|
||||||
| platformName | <code>string</code> | -- | Specify the platform name |
|
| platformName | <code>string</code> | -- | Specify the platform name. Alternatively, use the named slot "platform" (e.g. <span slot="platform">...</span>) |
|
||||||
| Alternatively, use the named slot "platform" (e.g. <span slot="platform">...</span>) |
|
|
||||||
| ref | <code>null | HTMLAnchorElement</code> | null | Obtain a reference to the HTML anchor element |
|
| ref | <code>null | HTMLAnchorElement</code> | null | Obtain a reference to the HTML anchor element |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
@ -1759,11 +1746,10 @@ import { HeaderAction } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | :------------ | :-------------------------------------------- |
|
| :-------- | :-------------------------------------------------------------------------------------------------- | :------------ | :------------------------------------------------------------------------------------------- |
|
||||||
| isOpen | <code>boolean</code> | false | Set to `true` to open the panel |
|
| isOpen | <code>boolean</code> | false | Set to `true` to open the panel |
|
||||||
| icon | <code>{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }</code> | -- | Specify the icon props |
|
| icon | <code>{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }</code> | -- | Specify the icon props |
|
||||||
| text | <code>string</code> | -- | Specify the text |
|
| text | <code>string</code> | -- | Specify the text. Alternatively, use the named slot "text" (e.g. <div slot="text">...</div>) |
|
||||||
| Alternatively, use the named slot "text" (e.g. <div slot="text">...</div>) |
|
|
||||||
| ref | <code>null | HTMLButtonElement</code> | null | Obtain a reference to the button HTML element |
|
| ref | <code>null | HTMLButtonElement</code> | null | Obtain a reference to the button HTML element |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
@ -2093,9 +2079,8 @@ import { Icon } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :---------------------------------------------- | :------------------------------------------------------------------ | :------------ | :---------------------------------------------------- |
|
| :-------- | :------------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------------------------------------- |
|
||||||
| render | <code>typeof import("carbon-icons-svelte/lib/Add16").default</code> | -- | Specify the icon from `carbon-icons-svelte` to render |
|
| render | <code>typeof import("carbon-icons-svelte/lib/Add16").default</code> | -- | Specify the icon from `carbon-icons-svelte` to render. Icon size must be 16px (e.g. `Add16`, `Task16`) |
|
||||||
| Icon size must be 16px (e.g. `Add16`, `Task16`) |
|
|
||||||
| skeleton | <code>boolean</code> | false | Set to `true` to display the skeleton state |
|
| skeleton | <code>boolean</code> | false | Set to `true` to display the skeleton state |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
@ -2702,7 +2687,7 @@ interface MultiSelectItem {
|
||||||
```
|
```
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :-------------------------------------------------- | :----------------------------------------------------------------------- | :----------------- | :--------------------------------------------------------------- |
|
| :---------------- | :----------------------------------------------------------------------- | :----------------- | :-------------------------------------------------------------------------------- |
|
||||||
| items | <code>MultiSelectItem[]</code> | -- | Set the multiselect items |
|
| items | <code>MultiSelectItem[]</code> | -- | Set the multiselect items |
|
||||||
| itemToString | <code>(item: MultiSelectItem) => string</code> | -- | Override the display of a multiselect item |
|
| itemToString | <code>(item: MultiSelectItem) => string</code> | -- | Override the display of a multiselect item |
|
||||||
| selectedIds | <code>MultiSelectItemId[]</code> | -- | Set the selected ids |
|
| selectedIds | <code>MultiSelectItemId[]</code> | -- | Set the selected ids |
|
||||||
|
@ -2712,14 +2697,12 @@ interface MultiSelectItem {
|
||||||
| selectionFeedback | <code>"top" | "fixed" | "top-after-reopen"</code> | "top-after-reopen" | Specify the selection feedback after selecting items |
|
| selectionFeedback | <code>"top" | "fixed" | "top-after-reopen"</code> | "top-after-reopen" | Specify the selection feedback after selecting items |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the dropdown |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the dropdown |
|
||||||
| filterable | <code>boolean</code> | false | Set to `true` to filter items |
|
| filterable | <code>boolean</code> | false | Set to `true` to filter items |
|
||||||
| filterItem | <code>(item: MultiSelectItem, value: string) => string</code> | -- | Override the filtering logic |
|
| filterItem | <code>(item: MultiSelectItem, value: string) => string</code> | -- | Override the filtering logic. The default filtering is an exact string comparison |
|
||||||
| The default filtering is an exact string comparison |
|
|
||||||
| open | <code>boolean</code> | false | Set to `true` to open the dropdown |
|
| open | <code>boolean</code> | false | Set to `true` to open the dropdown |
|
||||||
| light | <code>boolean</code> | false | Set to `true` to enable the light variant |
|
| light | <code>boolean</code> | false | Set to `true` to enable the light variant |
|
||||||
| locale | <code>string</code> | "en" | Specify the locale |
|
| locale | <code>string</code> | "en" | Specify the locale |
|
||||||
| placeholder | <code>string</code> | "" | Specify the placeholder text |
|
| placeholder | <code>string</code> | "" | Specify the placeholder text |
|
||||||
| sortItem | <code>(a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem</code> | -- | Override the sorting logic |
|
| sortItem | <code>(a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem</code> | -- | Override the sorting logic. The default sorting compare the item text value |
|
||||||
| The default sorting compare the item text value |
|
|
||||||
| translateWithId | <code>(id: any) => string</code> | -- | Override the default translation ids |
|
| translateWithId | <code>(id: any) => string</code> | -- | Override the default translation ids |
|
||||||
| titleText | <code>string</code> | "" | Specify the title text |
|
| titleText | <code>string</code> | "" | Specify the title text |
|
||||||
| useTitleInItem | <code>boolean</code> | false | Set to `true` to pass the item to `itemToString` in the checkbox |
|
| useTitleInItem | <code>boolean</code> | false | Set to `true` to pass the item to `itemToString` in the checkbox |
|
||||||
|
@ -3041,9 +3024,8 @@ import { OverflowMenuItem } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------------------- | :------------------------------------------------------------------ | :------------- | :---------------------------------------------------------------- |
|
| :----------- | :------------------------------------------------------------------ | :------------- | :------------------------------------------------------------------------------ |
|
||||||
| text | <code>string</code> | "Provide text" | Specify the item text |
|
| text | <code>string</code> | "Provide text" | Specify the item text. Alternatively, use the default slot for a custom element |
|
||||||
| Alternatively, use the default slot for a custom element |
|
|
||||||
| href | <code>string</code> | "" | Specify the `href` attribute if the item is a link |
|
| href | <code>string</code> | "" | Specify the `href` attribute if the item is a link |
|
||||||
| primaryFocus | <code>boolean</code> | false | Set to `true` if the item should be focused when opening the menu |
|
| primaryFocus | <code>boolean</code> | false | Set to `true` if the item should be focused when opening the menu |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the item |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the item |
|
||||||
|
@ -3482,9 +3464,8 @@ import { Row } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :------------------------------------------------------------------------------------------------------------------ | :------------------- | :------------ | :-------------------------------------------- |
|
| :------------ | :------------------- | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element |
|
| as | <code>boolean</code> | false | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Row let:props><section {...props}>...</section></Row>) |
|
||||||
| Props are destructured as `props` in the default slot (e.g. <Row let:props><section {...props}>...</section></Row>) |
|
|
||||||
| condensed | <code>boolean</code> | false | Set to `true` to use the condensed variant |
|
| condensed | <code>boolean</code> | false | Set to `true` to use the condensed variant |
|
||||||
| narrow | <code>boolean</code> | false | Set to `true` to use the narrow variant |
|
| narrow | <code>boolean</code> | false | Set to `true` to use the narrow variant |
|
||||||
| noGutter | <code>boolean</code> | false | Set to `true` to remove the gutter |
|
| noGutter | <code>boolean</code> | false | Set to `true` to remove the gutter |
|
||||||
|
@ -4307,9 +4288,8 @@ import { Switch } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :--------------------------------------------------------------------------- | :----------------------------------------- | :------------- | :-------------------------------------------- |
|
| :-------- | :----------------------------------------- | :------------- | :---------------------------------------------------------------------------------------------------- |
|
||||||
| text | <code>string</code> | "Provide text" | Specify the switch text |
|
| text | <code>string</code> | "Provide text" | Specify the switch text. Alternatively, use the named slot "text" (e.g. <span slot="text">...</span>) |
|
||||||
| Alternatively, use the named slot "text" (e.g. <span slot="text">...</span>) |
|
|
||||||
| selected | <code>boolean</code> | false | Set to `true` for the switch to be selected |
|
| selected | <code>boolean</code> | false | Set to `true` for the switch to be selected |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the switch |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the switch |
|
||||||
| id | <code>string</code> | -- | Set an id for the button element |
|
| id | <code>string</code> | -- | Set an id for the button element |
|
||||||
|
@ -4344,9 +4324,8 @@ import { Tab } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :----------------------------------------------------------------------- | :----------------------------------------- | :------------ | :-------------------------------------------- |
|
| :-------- | :----------------------------------------- | :------------ | :---------------------------------------------------------------------------------------------- |
|
||||||
| label | <code>string</code> | "" | Specify the tab label |
|
| label | <code>string</code> | "" | Specify the tab label. Alternatively, use the default slot (e.g. <Tab><span>Label</span></Tab>) |
|
||||||
| Alternatively, use the default slot (e.g. <Tab><span>Label</span></Tab>) |
|
|
||||||
| href | <code>string</code> | "#" | Specify the href attribute |
|
| href | <code>string</code> | "#" | Specify the href attribute |
|
||||||
| disabled | <code>boolean</code> | false | Set to `true` to disable the tab |
|
| disabled | <code>boolean</code> | false | Set to `true` to disable the tab |
|
||||||
| tabindex | <code>string</code> | "0" | Specify the tabindex |
|
| tabindex | <code>string</code> | "0" | Specify the tabindex |
|
||||||
|
@ -5243,12 +5222,11 @@ import { Tooltip } from "carbon-components-svelte";
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value | Description |
|
| Prop name | Type | Default value | Description |
|
||||||
| :---------------------------------------------- | :------------------------------------------------------------------ | :------------ | :--------------------------------------------------------------------------- |
|
| :-------------- | :------------------------------------------------------------------ | :------------ | :---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| direction | <code>"top" | "right" | "bottom" | "left"</code> | "bottom" | Set the direction of the tooltip relative to the button |
|
| direction | <code>"top" | "right" | "bottom" | "left"</code> | "bottom" | Set the direction of the tooltip relative to the button |
|
||||||
| open | <code>boolean</code> | false | Set to `true` to open the tooltip |
|
| open | <code>boolean</code> | false | Set to `true` to open the tooltip |
|
||||||
| hideIcon | <code>boolean</code> | false | Set to `true` to hide the tooltip icon |
|
| hideIcon | <code>boolean</code> | false | Set to `true` to hide the tooltip icon |
|
||||||
| icon | <code>typeof import("carbon-icons-svelte/lib/Add16").default</code> | -- | Specify the icon from `carbon-icons-svelte` to render for the tooltip button |
|
| icon | <code>typeof import("carbon-icons-svelte/lib/Add16").default</code> | -- | Specify the icon from `carbon-icons-svelte` to render for the tooltip button. Icon size must be 16px (e.g. `Add16`, `Task16`) |
|
||||||
| Icon size must be 16px (e.g. `Add16`, `Task16`) |
|
|
||||||
| iconDescription | <code>string</code> | "" | Specify the ARIA label for the tooltip button |
|
| iconDescription | <code>string</code> | "" | Specify the ARIA label for the tooltip button |
|
||||||
| iconName | <code>string</code> | "" | Specify the icon name attribute |
|
| iconName | <code>string</code> | "" | Specify the icon name attribute |
|
||||||
| tabindex | <code>string</code> | "0" | Set the button tabindex |
|
| tabindex | <code>string</code> | "0" | Set the button tabindex |
|
||||||
|
|
|
@ -63,9 +63,9 @@ export function generateIndex(components, groups, pkg) {
|
||||||
exported_props.forEach((prop, name) => {
|
exported_props.forEach((prop, name) => {
|
||||||
code += `| ${name}${
|
code += `| ${name}${
|
||||||
prop.kind === "const" ? " (`constant`)" : ""
|
prop.kind === "const" ? " (`constant`)" : ""
|
||||||
} | ${formatType(prop.type)} | ${prop.value || "--"} | ${
|
} | ${formatType(prop.type)} | ${
|
||||||
prop.description
|
prop.value || "--"
|
||||||
} |\n`;
|
} | ${prop.description.replace(/\n/g, ". ")} |\n`;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
code += "No exported props.\n\n";
|
code += "No exported props.\n\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue