mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
ceb7abf2e9
commit
2858776367
7 changed files with 57 additions and 5 deletions
29
docs/src/pages/framed/ComboBox/ComboBoxSlot.svelte
Normal file
29
docs/src/pages/framed/ComboBox/ComboBoxSlot.svelte
Normal file
|
@ -0,0 +1,29 @@
|
|||
<script>
|
||||
import { ComboBox } from "carbon-components-svelte";
|
||||
</script>
|
||||
|
||||
<ComboBox
|
||||
titleText="Contact"
|
||||
placeholder="Select contact method"
|
||||
items="{[
|
||||
{ id: '0', text: 'Slack' },
|
||||
{ id: '1', text: 'Email' },
|
||||
{ id: '2', text: 'Fax' },
|
||||
]}"
|
||||
let:item
|
||||
let:index
|
||||
>
|
||||
<div>
|
||||
<strong>{item.text}</strong>
|
||||
</div>
|
||||
<div>
|
||||
id: {item.id} - index:
|
||||
{index}
|
||||
</div>
|
||||
</ComboBox>
|
||||
|
||||
<style>
|
||||
:global(.bx--list-box__menu-item, .bx--list-box__menu-item__option) {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue