mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
docs: add "Disabled items" examples
This commit is contained in:
parent
d53421a321
commit
c690bee810
3 changed files with 45 additions and 3 deletions
|
@ -112,7 +112,7 @@ items={[
|
||||||
{id: "2", text: "Fax"}
|
{id: "2", text: "Fax"}
|
||||||
]} />
|
]} />
|
||||||
|
|
||||||
### Disabled
|
### Disabled state
|
||||||
|
|
||||||
<ComboBox disabled titleText="Contact" placeholder="Select contact method"
|
<ComboBox disabled titleText="Contact" placeholder="Select contact method"
|
||||||
items={[
|
items={[
|
||||||
|
@ -120,3 +120,17 @@ items={[
|
||||||
{id: "1", text: "Email"},
|
{id: "1", text: "Email"},
|
||||||
{id: "2", text: "Fax"}
|
{id: "2", text: "Fax"}
|
||||||
]} />
|
]} />
|
||||||
|
|
||||||
|
### Disabled items
|
||||||
|
|
||||||
|
Use the `disabled` property in the `items` prop to disable specific items.
|
||||||
|
|
||||||
|
<ComboBox
|
||||||
|
titleText="Contact"
|
||||||
|
placeholder="Select contact method"
|
||||||
|
items={[
|
||||||
|
{ id: "0", text: "Slack" },
|
||||||
|
{ id: "1", text: "Email", disabled: true },
|
||||||
|
{ id: "2", text: "Fax" },
|
||||||
|
]}
|
||||||
|
/>
|
|
@ -95,6 +95,20 @@ Set `direction` to `"top"` for the dropdown menu to appear above the input.
|
||||||
{id: "1", text: "Email"},
|
{id: "1", text: "Email"},
|
||||||
{id: "2", text: "Fax"}]}" />
|
{id: "2", text: "Fax"}]}" />
|
||||||
|
|
||||||
|
### Disabled items
|
||||||
|
|
||||||
|
Use the `disabled` property in the `items` prop to disable specific items.
|
||||||
|
|
||||||
|
<Dropdown
|
||||||
|
selectedId="0"
|
||||||
|
titleText="Contact"
|
||||||
|
items={[
|
||||||
|
{ id: "0", text: "Slack" },
|
||||||
|
{ id: "1", text: "Email", disabled: true },
|
||||||
|
{ id: "2", text: "Fax" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
|
||||||
### Skeleton
|
### Skeleton
|
||||||
|
|
||||||
<DropdownSkeleton />
|
<DropdownSkeleton />
|
|
@ -146,3 +146,17 @@ Set `direction` to `"top"` for the dropdown menu to appear above the input.
|
||||||
{id: "1", text: "Email"},
|
{id: "1", text: "Email"},
|
||||||
{id: "2", text: "Fax"}]}"
|
{id: "2", text: "Fax"}]}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
### Disabled items
|
||||||
|
|
||||||
|
Use the `disabled` property in the `items` prop to disable specific items.
|
||||||
|
|
||||||
|
<MultiSelect
|
||||||
|
titleText="Contact"
|
||||||
|
label="Select contact methods..."
|
||||||
|
items={[
|
||||||
|
{ id: "0", text: "Slack" },
|
||||||
|
{ id: "1", text: "Email", disabled: true },
|
||||||
|
{ id: "2", text: "Fax" },
|
||||||
|
]}
|
||||||
|
/>
|
Loading…
Add table
Add a link
Reference in a new issue