Skip to content

Commit c6d923f

Browse files
llastflowerspksjce
andauthored
Remove support for sx from AvatarStack component (#6652)
Co-authored-by: Pavithra Kodmad <[email protected]>
1 parent 5bbaae7 commit c6d923f

File tree

6 files changed

+6
-33
lines changed

6 files changed

+6
-33
lines changed

.changeset/few-mails-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": major
3+
---
4+
5+
Update AvatarStack component to no longer support sx

e2e/components/AvatarStack.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ const stories: Array<{title: string; id: string}> = [
3939
title: 'Custom Size On Children Responsive',
4040
id: 'components-avatarstack-features--custom-size-on-children-responsive',
4141
},
42-
{
43-
title: 'SX Prop',
44-
id: 'components-avatarstack-dev--sx-prop',
45-
},
4642
{
4743
title: 'With Link Wrappers',
4844
id: 'components-avatarstack-dev--with-link-wrappers',

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@ export default {
88
component: AvatarStack,
99
} as Meta<typeof AvatarStack>
1010

11-
export const SxProp = () => (
12-
<AvatarStack
13-
alignRight
14-
sx={{
15-
backgroundColor: 'red',
16-
}}
17-
>
18-
<Avatar alt="Primer logo" src="https://avatars.githubusercontent.com/primer" />
19-
<Avatar alt="GitHub logo" src="https://avatars.githubusercontent.com/github" />
20-
<Avatar alt="Atom logo" src="https://avatars.githubusercontent.com/atom" />
21-
<Avatar alt="GitHub Desktop logo" src="https://avatars.githubusercontent.com/desktop" />
22-
</AvatarStack>
23-
)
24-
2511
export const WithLinkWrappers = () => (
2612
<AvatarStack>
2713
<Link aria-label="Primer is assigned" href="#" className="pc-AvatarItem" data-hovercard-url="/primer">

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@
6363
"type": "string",
6464
"description": "Class name for custom styling.",
6565
"defaultValue": ""
66-
},
67-
{
68-
"name": "sx",
69-
"type": "SystemStyleObject",
70-
"deprecated": true
7166
}
7267
],
7368
"subcomponents": []

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,4 @@ Playground.argTypes = {
5858
type: 'number',
5959
},
6060
},
61-
sx: {
62-
controls: false,
63-
table: {
64-
disable: true,
65-
},
66-
},
6761
}

packages/react/src/AvatarStack/AvatarStack.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {clsx} from 'clsx'
22
import React, {useEffect, useRef, useState} from 'react'
3-
import type {SxProp} from '../sx'
43
import type {AvatarProps} from '../Avatar/Avatar'
54
import {DEFAULT_AVATAR_SIZE} from '../Avatar/Avatar'
65
import type {ResponsiveValue} from '../hooks/useResponsiveValue'
@@ -30,7 +29,7 @@ export type AvatarStackProps = {
3029
className?: string
3130
children: React.ReactNode
3231
style?: React.CSSProperties
33-
} & SxProp
32+
}
3433

3534
const AvatarStackBody = ({
3635
disableExpand,
@@ -69,7 +68,6 @@ const AvatarStack = ({
6968
size,
7069
className,
7170
style,
72-
sx: sxProp,
7371
}: AvatarStackProps) => {
7472
const [hasInteractiveChildren, setHasInteractiveChildren] = useState<boolean | undefined>(false)
7573
const stackContainer = useRef<HTMLDivElement>(null)
@@ -180,7 +178,6 @@ const AvatarStack = ({
180178
classes.AvatarStack,
181179
)}
182180
style={{...getResponsiveAvatarSizeStyles(), ...style}}
183-
sx={sxProp}
184181
>
185182
<AvatarStackBody
186183
disableExpand={disableExpand}

0 commit comments

Comments
 (0)