feat(Input/InputMenu/Select/SelectMenu): handle avatar prop

This commit is contained in:
Benjamin Canac
2024-10-17 18:21:12 +02:00
parent df2013ca92
commit 53a3796d1b
42 changed files with 618 additions and 842 deletions

View File

@@ -413,6 +413,32 @@ props:
You can customize this icon globally in your `app.config.ts` under `ui.icons.check` key.
::
### Avatar
Use the `avatar` prop to show an [Avatar](/components/avatar) inside the InputMenu.
::component-code
---
prettier: true
ignore:
- items
- modelValue
external:
- items
- modelValue
props:
modelValue: 'Nuxt'
avatar:
src: 'https://github.com/nuxt.png'
items:
- Nuxt
- NuxtHub
- NuxtLabs
- Nuxt Modules
- Nuxt Community
---
::
### Loading
Use the `loading` prop to show a loading icon on the InputMenu.
@@ -538,7 +564,7 @@ name: 'input-menu-items-icon-example'
::
::tip
You can also use the `#leading` slot to display the selected icon, like in the next example.
You can also use the `#leading` slot to display the selected icon.
::
### With avatar in items
@@ -552,8 +578,8 @@ name: 'input-menu-items-avatar-example'
---
::
::note
In this example, the `#leading` slot is used to display the selected avatar.
::tip
You can also use the `#leading` slot to display the selected avatar.
::
### With chip in items