From e142058241b44e3feadf1e69f9d4b8eb136abd1f Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Thu, 19 Mar 2026 19:58:58 +0000 Subject: [PATCH 1/2] Remove Avatar component and its related tests from styled-react --- .../__tests__/__snapshots__/exports.test.ts.snap | 1 - .../src/__tests__/primer-react.browser.test.tsx | 6 ------ packages/styled-react/src/components/Avatar.tsx | 12 ------------ packages/styled-react/src/index.tsx | 14 -------------- 4 files changed, 33 deletions(-) delete mode 100644 packages/styled-react/src/components/Avatar.tsx diff --git a/packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap b/packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap index 1c5e65a8483..d3c996ad315 100644 --- a/packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap +++ b/packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap @@ -4,7 +4,6 @@ exports[`@primer/styled-react exports 1`] = ` [ "ActionList", "ActionMenu", - "Avatar", "BaseStyles", "Box", "Breadcrumb", diff --git a/packages/styled-react/src/__tests__/primer-react.browser.test.tsx b/packages/styled-react/src/__tests__/primer-react.browser.test.tsx index d0c93ae5c14..e66580bdcbe 100644 --- a/packages/styled-react/src/__tests__/primer-react.browser.test.tsx +++ b/packages/styled-react/src/__tests__/primer-react.browser.test.tsx @@ -5,7 +5,6 @@ import {describe, expect, test} from 'vitest' import { ActionList, ActionMenu, - Avatar, Box, Breadcrumbs, Button, @@ -59,11 +58,6 @@ describe('@primer/react', () => { expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)') }) - test('Avatar supports `sx` prop', () => { - render() - expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)') - }) - test('Box supports `sx` prop', () => { render() expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)') diff --git a/packages/styled-react/src/components/Avatar.tsx b/packages/styled-react/src/components/Avatar.tsx deleted file mode 100644 index bad340bf8bf..00000000000 --- a/packages/styled-react/src/components/Avatar.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import {type AvatarProps as PrimerAvatarProps, Avatar as PrimerAvatar} from '@primer/react' -import {forwardRef} from 'react' -import type {StyledProps} from '../styled-props' -import {Box} from './Box' - -type AvatarProps = PrimerAvatarProps & StyledProps -const Avatar = forwardRef(function Avatar(props, ref) { - return -}) - -export {Avatar} -export type {AvatarProps} diff --git a/packages/styled-react/src/index.tsx b/packages/styled-react/src/index.tsx index e4ac5d841d6..436f7830abb 100644 --- a/packages/styled-react/src/index.tsx +++ b/packages/styled-react/src/index.tsx @@ -135,20 +135,6 @@ export { ActionMenu, } from './components/ActionMenu' -export { - /** - * @deprecated Usage of the `sx` prop with this component is no longer - * supported. Use the component from `@primer/react` with CSS Modules instead. - */ - Avatar, - - /** - * @deprecated Usage of the `sx` prop with this component is no longer - * supported. Use the component from `@primer/react` with CSS Modules instead. - */ - type AvatarProps, -} from './components/Avatar' - export { /** * @deprecated Usage of the `sx` prop with this component is no longer From fb0456d580c41bd203600ecf6e37b90a013abe31 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Thu, 19 Mar 2026 13:00:40 -0700 Subject: [PATCH 2/2] Remove Avatar component from @primer/styled-react This change removes the Avatar component from the @primer/styled-react package. --- .changeset/great-pots-suffer.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/great-pots-suffer.md diff --git a/.changeset/great-pots-suffer.md b/.changeset/great-pots-suffer.md new file mode 100644 index 00000000000..741e0d646c6 --- /dev/null +++ b/.changeset/great-pots-suffer.md @@ -0,0 +1,5 @@ +--- +"@primer/styled-react": patch +--- + +Remove Avatar component from @primer/styled-react