style(ui-avatar): use the rectangleradius token for the rectangle var…#2592
style(ui-avatar): use the rectangleradius token for the rectangle var…#2592adamlobler wants to merge 2 commits into
Conversation
…iant of the avatar
|
Visual regression report✅ No changes.
Baselines come from the |
matyasf
left a comment
There was a problem hiding this comment.
Looks good. The code
<Avatar name="Arthur C. Clarke" shape="rectangle"
themeOverride={{ rectangleRadius: '0.7rem' }}/>
overrides thist token correctly
matyasf
left a comment
There was a problem hiding this comment.
While the code works OK, can you please fix the broken test too?
This override works now:
<Avatar name="Arthur C. Clarke" shape="rectangle"
themeOverride={{ rectangleRadius: '0.7rem' }}/>
This test is broken:
packages/ui-avatar/src/Avatar/__tests__/Avatar.test.tsx > <Avatar /> > when shape is set to "rectangle" > should display as a rectangle
Error: expect(element).toHaveStyle()
- Expected
- border-radius: 0;
+ border-radius: 0rem;
❯ packages/ui-avatar/src/Avatar/__tests__/Avatar.test.tsx:169:25
167| )
168| const avatarDiv = container.querySelector('div')
169| expect(avatarDiv).toHaveStyle('border-radius: 0')
| ^
170| })
171| })
I don’t have an exact radius value that I can check. I only have the |
Here the fix should be simple. Instead of You can test that it passes with |
No description provided.