Skip to content

Commit 2af1744

Browse files
authored
AvatarStack: document variant and shape props in docs and Storybook (#7769)
1 parent 6e71d16 commit 2af1744

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

packages/react/src/AvatarStack/AvatarStack.docs.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@
5252
"defaultValue": "false",
5353
"description": "Do not spread the avatars on hover"
5454
},
55+
{
56+
"name": "variant",
57+
"type": "'cascade' | 'stack'",
58+
"defaultValue": "'cascade'",
59+
"description": "The style of overlapping avatars. 'cascade' increases the overlap for 3rd+ avatars, while 'stack' uses a uniform overlap."
60+
},
61+
{
62+
"name": "shape",
63+
"type": "'circle' | 'square'",
64+
"defaultValue": "'circle'",
65+
"description": "The shape of the avatars."
66+
},
5567
{
5668
"name": "size",
5769
"type": "number | { narrow?: number; regular?: number; wide?: number; }",

packages/react/src/AvatarStack/AvatarStack.stories.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export const Default = () => (
2626
)
2727

2828
export const Playground: StoryFn<Args> = args => (
29-
<AvatarStack size={parseSizeFromArgs(args)} alignRight={args.alignRight} disableExpand={args.disableExpand}>
29+
<AvatarStack
30+
size={parseSizeFromArgs(args)}
31+
alignRight={args.alignRight}
32+
disableExpand={args.disableExpand}
33+
variant={args.variant}
34+
shape={args.shape}
35+
>
3036
<Avatar alt="Primer logo" src="https://avatars.githubusercontent.com/primer" />
3137
<Avatar alt="GitHub logo" src="https://avatars.githubusercontent.com/github" />
3238
<Avatar alt="Atom logo" src="https://avatars.githubusercontent.com/atom" />

0 commit comments

Comments
 (0)