diff --git a/docs/components/content/examples/DropdownExampleSlot.vue b/docs/components/content/examples/DropdownExampleSlot.vue new file mode 100644 index 00000000..80a3dea0 --- /dev/null +++ b/docs/components/content/examples/DropdownExampleSlot.vue @@ -0,0 +1,47 @@ + + + diff --git a/docs/content/2.elements/4.dropdown.md b/docs/content/2.elements/4.dropdown.md index 67b7e71b..f2667880 100644 --- a/docs/content/2.elements/4.dropdown.md +++ b/docs/content/2.elements/4.dropdown.md @@ -12,8 +12,10 @@ Pass an array of arrays to the `items` prop of the Dropdown component. Each arra - `label` - The label of the item. - `icon` - The icon of the item. +- `iconClass` - The class of the icon of the item. - `avatar` - The avatar of the item. You can pass all the props of the [Avatar](/elements/avatar) component. - `shortcuts` - The shortcuts of the item. +- `slot` - The slot of the item. - `disabled` - Whether the item is disabled. - `click` - The click handler of the item. @@ -95,6 +97,68 @@ const items = [ ``` :: +## Slots + +### `item` + +Use the `#item` slot to customize the items content or pass a `slot` property to customize a specific item. You will have access to the `item` property in the slot scope. + +::component-example +#default +:dropdown-example-slot + +#code +```vue + + + +``` +:: + ## Props :component-props