Skip to content

Commit 84f006e

Browse files
committed
Apply v12 Avatar migration on polaris-react
1 parent 4916b28 commit 84f006e

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

polaris-react/src/components/Avatar/tests/Avatar.test.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ describe('<Avatar />', () => {
7171
describe('Initials', () => {
7272
it('renders initials if the Image onError prop is triggered and the Intials are provided', () => {
7373
const avatar = mountWithApp(
74-
<Avatar size="large" initials="DL" source="image/path/" />,
74+
<Avatar size="2xl" initials="DL" source="image/path/" />,
7575
);
7676

7777
expect(avatar).toContainReactComponent(Image);
@@ -97,12 +97,7 @@ describe('<Avatar />', () => {
9797
it('gets invoked in the event of an error', () => {
9898
const spy = jest.fn();
9999
const avatar = mountWithApp(
100-
<Avatar
101-
size="large"
102-
initials="DL"
103-
source="image/path/"
104-
onError={spy}
105-
/>,
100+
<Avatar size="2xl" initials="DL" source="image/path/" onError={spy} />,
106101
);
107102

108103
avatar.find(Image)!.trigger('onError');
@@ -114,7 +109,7 @@ describe('<Avatar />', () => {
114109
it('re-renders the image if a the source prop is changed after an error', () => {
115110
const workingSrc = 'image/goodPath/';
116111
const avatar = mountWithApp(
117-
<Avatar size="large" initials="DL" source="image/path/" />,
112+
<Avatar size="2xl" initials="DL" source="image/path/" />,
118113
);
119114
avatar.find(Image)!.trigger('onError');
120115

polaris-react/src/components/TopBar/components/UserMenu/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function UserMenu({
7272
</span>
7373
<MessageIndicator active={showIndicator}>
7474
<Avatar
75-
size="medium"
75+
size="xl"
7676
initials={initials && initials.replace(' ', '')}
7777
source={avatar}
7878
name={name}

0 commit comments

Comments
 (0)