Skip to content

Commit a1beace

Browse files
authored
docs(avatar): use chip prop in example (#4551)
1 parent 4949120 commit a1beace

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed
Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
<template>
22
<UAvatarGroup>
3-
<UChip inset color="success">
4-
<UAvatar
5-
src="https://github.com/benjamincanac.png"
6-
alt="Benjamin Canac"
7-
/>
8-
</UChip>
3+
<UAvatar
4+
src="https://github.com/benjamincanac.png"
5+
alt="Benjamin Canac"
6+
:chip="{ inset: true, color: 'success' }"
7+
/>
98

10-
<UChip inset color="warning">
11-
<UAvatar
12-
src="https://github.com/romhml.png"
13-
alt="Romain Hamel"
14-
/>
15-
</UChip>
9+
<UAvatar
10+
src="https://github.com/romhml.png"
11+
alt="Romain Hamel"
12+
:chip="{ inset: true, color: 'warning' }"
13+
/>
1614

17-
<UChip inset color="error">
18-
<UAvatar
19-
src="https://github.com/noook.png"
20-
alt="Neil Richter"
21-
/>
22-
</UChip>
15+
<UAvatar
16+
src="https://github.com/noook.png"
17+
alt="Neil Richter"
18+
:chip="{ inset: true, color: 'error' }"
19+
/>
2320
</UAvatarGroup>
2421
</template>

docs/app/components/content/examples/avatar/AvatarChipExample.vue

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/content/3.components/avatar.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,23 @@ props:
8484
The `alt` prop is passed to the `img` element as the `alt` attribute.
8585
::
8686

87+
### Chip
88+
89+
Use the `chip` prop to display a chip around the Avatar.
90+
91+
::component-code
92+
---
93+
prettier: true
94+
ignore:
95+
- src
96+
- chip.inset
97+
props:
98+
src: 'https://github.com/benjamincanac.png'
99+
chip:
100+
inset: true
101+
---
102+
::
103+
87104
## Examples
88105

89106
### With tooltip
@@ -92,12 +109,6 @@ You can use a [Tooltip](/components/tooltip) component to display a tooltip when
92109

93110
:component-example{name="avatar-tooltip-example"}
94111

95-
### With chip
96-
97-
You can use a [Chip](/components/chip) component to display a chip around the Avatar.
98-
99-
:component-example{name="avatar-chip-example"}
100-
101112
## API
102113

103114
### Props

0 commit comments

Comments
 (0)