Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/few-mails-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": major
---

Update AvatarStack component to no longer support sx
4 changes: 0 additions & 4 deletions e2e/components/AvatarStack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ const stories: Array<{title: string; id: string}> = [
title: 'Custom Size On Children Responsive',
id: 'components-avatarstack-features--custom-size-on-children-responsive',
},
{
title: 'SX Prop',
id: 'components-avatarstack-dev--sx-prop',
},
{
title: 'With Link Wrappers',
id: 'components-avatarstack-dev--with-link-wrappers',
Expand Down
14 changes: 0 additions & 14 deletions packages/react/src/AvatarStack/AvatarStack.dev.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ export default {
component: AvatarStack,
} as Meta<typeof AvatarStack>

export const SxProp = () => (
<AvatarStack
alignRight
sx={{
backgroundColor: 'red',
}}
>
<Avatar alt="Primer logo" src="https://avatars.githubusercontent.com/primer" />
<Avatar alt="GitHub logo" src="https://avatars.githubusercontent.com/github" />
<Avatar alt="Atom logo" src="https://avatars.githubusercontent.com/atom" />
<Avatar alt="GitHub Desktop logo" src="https://avatars.githubusercontent.com/desktop" />
</AvatarStack>
)

export const WithLinkWrappers = () => (
<AvatarStack>
<Link aria-label="Primer is assigned" href="#" className="pc-AvatarItem" data-hovercard-url="/primer">
Expand Down
5 changes: 0 additions & 5 deletions packages/react/src/AvatarStack/AvatarStack.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@
"type": "string",
"description": "Class name for custom styling.",
"defaultValue": ""
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
],
"subcomponents": []
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/AvatarStack/AvatarStack.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,4 @@ Playground.argTypes = {
type: 'number',
},
},
sx: {
controls: false,
table: {
disable: true,
},
},
}
5 changes: 1 addition & 4 deletions packages/react/src/AvatarStack/AvatarStack.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {clsx} from 'clsx'
import React, {useEffect, useRef, useState} from 'react'
import type {SxProp} from '../sx'
import type {AvatarProps} from '../Avatar/Avatar'
import {DEFAULT_AVATAR_SIZE} from '../Avatar/Avatar'
import type {ResponsiveValue} from '../hooks/useResponsiveValue'
Expand Down Expand Up @@ -30,7 +29,7 @@ export type AvatarStackProps = {
className?: string
children: React.ReactNode
style?: React.CSSProperties
} & SxProp
}

const AvatarStackBody = ({
disableExpand,
Expand Down Expand Up @@ -69,7 +68,6 @@ const AvatarStack = ({
size,
className,
style,
sx: sxProp,
}: AvatarStackProps) => {
const [hasInteractiveChildren, setHasInteractiveChildren] = useState<boolean | undefined>(false)
const stackContainer = useRef<HTMLDivElement>(null)
Expand Down Expand Up @@ -180,7 +178,6 @@ const AvatarStack = ({
classes.AvatarStack,
)}
style={{...getResponsiveAvatarSizeStyles(), ...style}}
sx={sxProp}
>
<AvatarStackBody
disableExpand={disableExpand}
Expand Down
Loading