mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(components): add Dropdown
Closes #22 - Revise ListBox ancillary components - Pass item id to ListBoxMenuItem in MultiSelect, ComboBox
This commit is contained in:
parent
07d97da8a7
commit
eb70437dc3
22 changed files with 279 additions and 19 deletions
|
@ -16,7 +16,7 @@
|
|||
[translationIds.close]: 'Close menu',
|
||||
[translationIds.open]: 'Open menu'
|
||||
};
|
||||
const ctx = getContext('MultiSelect');
|
||||
const ctx = getContext('MultiSelect') || getContext('Dropdown');
|
||||
|
||||
let fieldRef = undefined;
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
|||
aria-expanded={ariaExpanded}
|
||||
aria-owns={(ariaExpanded && menuId) || undefined}
|
||||
aria-controls={(ariaExpanded && menuId) || undefined}
|
||||
aria-disabled={disabled}
|
||||
aria-label={ariaExpanded ? translateWithId('close') : translateWithId('open')}
|
||||
tabindex={disabled ? '-1' : tabindex}
|
||||
class={cx('--list-box__field', className)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue