mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 16:30:45 +01:00
feat(Tabs): handle icon in items (#1798)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ links:
|
||||
Pass an array to the `items` prop of the Tabs component. Each item can have the following properties:
|
||||
|
||||
- `label` - The label of the item.
|
||||
- `icon` - The icon of the item.
|
||||
- `slot` - A key to customize the item with a slot.
|
||||
- `content` - The content to display in the panel by default.
|
||||
- `disabled` - Determines whether the item is disabled or not.
|
||||
@@ -91,6 +92,14 @@ Use the `#default` slot to customize the content of the trigger buttons. You wil
|
||||
|
||||
:component-example{component="tabs-example-default-slot"}
|
||||
|
||||
|
||||
### `icon`
|
||||
|
||||
Use the `#icon` slot to customize the icon of the trigger buttons. You will have access to the `item`, `index`, `selected` and `disabled` in the slot scope.
|
||||
|
||||
:component-example{component="tabs-example-icon-slot"}
|
||||
|
||||
|
||||
### `item`
|
||||
|
||||
Use the `#item` slot to customize the items content. You will have access to the `item`, `index` and `selected` properties in the slot scope.
|
||||
|
||||
Reference in New Issue
Block a user