docs: improve slots sections

This commit is contained in:
Benjamin Canac
2023-06-01 15:29:02 +02:00
parent c63981e31c
commit 130a1f2c54
7 changed files with 173 additions and 8 deletions

View File

@@ -275,6 +275,48 @@ code: |
:u-button{icon="i-heroicons-chevron-down-20-solid" color="gray"}
::
## Slots
### `leading`
Use the `#leading` slot to set the content of the leading icon.
::component-card
---
slots:
leading: <UAvatar src="https://avatars.githubusercontent.com/u/739984?v=4" size="3xs" />
baseProps:
color: 'gray'
props:
label: Button
color: 'gray'
excludedProps:
- color
---
#leading
:u-avatar{src="https://avatars.githubusercontent.com/u/739984?v=4" size="3xs"}
::
### `trailing`
Use the `#trailing` slot to set the content of the trailing icon.
::component-card
---
slots:
trailing: <UIcon name="i-heroicons-arrow-right-20-solid" />
props:
label: Button
color: 'gray'
excludedProps:
- color
---
#trailing
:u-icon{name="i-heroicons-arrow-right-20-solid"}
::
## Props
:component-props