mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
docs(dropdown-menu): update
This commit is contained in:
@@ -8,11 +8,14 @@ links:
|
||||
|
||||
## Usage
|
||||
|
||||
### Items
|
||||
|
||||
Use the `items` prop as an array of objects with the following properties:
|
||||
|
||||
- `label?: string`{lang="ts-type"}
|
||||
- `icon?: string`{lang="ts-type"}
|
||||
- `avatar?: AvatarProps`{lang="ts-type"}
|
||||
- `class?: any`{lang="ts-type"}
|
||||
- [`slot?: string`{lang="ts-type"}](#with-custom-slot)
|
||||
|
||||
You can also pass any property from the [Link](/components/link#props) component such as `to`, `target`, etc.
|
||||
@@ -70,23 +73,57 @@ You can customize this icon globally in your `app.config.ts` under `ui.icons.che
|
||||
|
||||
## Examples
|
||||
|
||||
### With custom slot
|
||||
|
||||
Use the `slot` property to customize a specific item with a dropdown menu for example.
|
||||
|
||||
:component-example{name="breadcrumb-custom-slot-example"}
|
||||
|
||||
### With separator slot
|
||||
|
||||
Use the `#separator` slot to customize the separator between each item.
|
||||
|
||||
:component-example{name="breadcrumb-separator-slot-example"}
|
||||
|
||||
### With custom slot
|
||||
|
||||
Use the `slot` property to customize a specific item.
|
||||
|
||||
You will have access to the following slots:
|
||||
|
||||
- `{{ item.slot }}`{lang="ts-type"}
|
||||
- `{{ item.slot }}-leading`{lang="ts-type"}
|
||||
- `{{ item.slot }}-label`{lang="ts-type"}
|
||||
- `{{ item.slot }}-trailing`{lang="ts-type"}
|
||||
|
||||
:component-example{name="breadcrumb-custom-slot-example"}
|
||||
|
||||
::tip{to="#slots"}
|
||||
You can also use the `item`, `item-leading`, `item-label` and `item-trailing` slots to customize all items.
|
||||
::
|
||||
|
||||
## API
|
||||
|
||||
### Props
|
||||
|
||||
:component-props
|
||||
::component-props
|
||||
---
|
||||
ignore:
|
||||
- as
|
||||
- to
|
||||
- target
|
||||
- active
|
||||
- activeClass
|
||||
- inactiveClass
|
||||
- exactActiveClass
|
||||
- ariaCurrentValue
|
||||
- href
|
||||
- rel
|
||||
- noRel
|
||||
- prefetch
|
||||
- noPrefetch
|
||||
- prefetchedClass
|
||||
- replace
|
||||
- exact
|
||||
- exactQuery
|
||||
- exactHash
|
||||
- external
|
||||
---
|
||||
::
|
||||
|
||||
### Slots
|
||||
|
||||
|
||||
Reference in New Issue
Block a user