mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(dropdown): make Dropdown
slottable (#1182)
This commit is contained in:
parent
2858776367
commit
f5594daba6
7 changed files with 57 additions and 5 deletions
|
@ -19,6 +19,12 @@ components: ["Dropdown", "DropdownSkeleton"]
|
|||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}]}" />
|
||||
|
||||
### Custom slot
|
||||
|
||||
Override the default slot to customize the display of each item. Access the item and index through the `let:` directive.
|
||||
|
||||
<FileSource src="/framed/Dropdown/DropdownSlot" />
|
||||
|
||||
### Hidden label
|
||||
|
||||
<Dropdown hideLabel titleText="Contact" selectedId="0" items="{[{id: "0", text: "Slack"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue