You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: rename fullName to name on AvatarNameLabel, add image support to NameLabel
- Rename AvatarNameLabel fullName prop to name for API consistency with Avatar
- Add src and alt props to AvatarNameLabel — passes through to inner Avatar
- Update Figma Code Connect to map figma.string('Full Name') to name prop
- Update all tests, stories, types, and descriptions to match
- Add NameLabelWithPhoto story and update slot story with real photos
- Add src/alt to argTypes under Core category
- Reorder stories: Notification before Photo on both Avatar and NameLabel
'Override the auto-derived initial(s). 1–2 characters recommended.',
29
29
table: {category: 'Core'},
30
30
},
31
+
src: {
32
+
control: 'text',
33
+
description:
34
+
'Profile photo URL. When provided, renders a circular photo instead of initials.',
35
+
table: {category: 'Core'},
36
+
},
37
+
alt: {
38
+
control: 'text',
39
+
description:
40
+
'Alt text for the photo. Falls back to `name` if not provided.',
41
+
table: {category: 'Core'},
42
+
},
31
43
size: {
32
44
control: 'inline-radio',
33
45
options: ['sm','md','lg'],
@@ -77,41 +89,7 @@ Introduction.parameters = {
77
89
docs: {
78
90
description: {
79
91
story:
80
-
'Pass `name` to make the avatar accessible — initials are derived automatically and the avatar is announced to screen readers as `role="img"`. Without `name`, the initial is purely decorative. Inside `AvatarNameLabel` this is handled automatically from `fullName`.',
'Pass `src` to show a profile photo instead of initials. The image fills the circle with `object-fit: cover`. Use `name` for the accessible label — it becomes the `alt` text on the image.',
92
+
'Pass `name` to make the avatar accessible — initials are derived automatically and the avatar is announced to screen readers as `role="img"`. Without `name`, the initial is purely decorative. Inside `AvatarNameLabel` this is handled automatically from `name`.',
'Pass `src` to show a profile photo instead of initials. The image fills the circle with `object-fit: cover`. Use `name` for the accessible label — it becomes the `alt` text on the image.',
0 commit comments