feat: support item.disabled key for Dropdown, MultiSelect, ComboBox (#1328)

Closes #1326

* feat: support item.disabled key for `Dropdown`, `MultiSelect`, `ComboBox`

* Run "yarn build:docs"

* test: assert disabled property

* docs: add "Disabled items" examples
This commit is contained in:
metonym 2022-06-02 17:56:30 -07:00 committed by GitHub
commit f25a10c9c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 150 additions and 19 deletions

View file

@ -6,6 +6,7 @@ export type ComboBoxItemId = any;
export interface ComboBoxItem {
id: ComboBoxItemId;
text: string;
disabled?: boolean;
}
export interface ComboBoxProps

View file

@ -8,6 +8,7 @@ export type DropdownItemText = string;
export interface DropdownItem {
id: DropdownItemId;
text: DropdownItemText;
disabled?: boolean;
}
export interface DropdownProps

View file

@ -14,6 +14,12 @@ export interface ListBoxMenuItemProps
* @default false
*/
highlighted?: boolean;
/**
* Set to `true` to disable the menu item
* @default false
*/
disabled?: boolean;
}
export default class ListBoxMenuItem extends SvelteComponentTyped<

View file

@ -8,6 +8,7 @@ export type MultiSelectItemText = string;
export interface MultiSelectItem {
id: MultiSelectItemId;
text: MultiSelectItemText;
disabled?: boolean;
}
export interface MultiSelectProps