Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Merge 103cd15 into 6497dcf
Browse files Browse the repository at this point in the history
  • Loading branch information
brettjonesdev committed Apr 23, 2019
2 parents 6497dcf + 103cd15 commit c56b699
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/AvatarGrid/AvatarGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AvatarGrid extends Component<Props> {
borderColor: 'transparent',
center: true,
max: 9,
shape: 'rounded',
shape: 'circle',
showStatusBorderColor: true,
size: 'md',
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Message extends Component<Props> {

const avatarMarkup = avatar
? React.cloneElement(avatar, {
shape: isThemeEmbed ? 'circle' : 'rounded',
shape: 'circle',
size: isThemeEmbed ? 'xxs' : 'xs',
})
: null
Expand Down
17 changes: 15 additions & 2 deletions src/components/Message/__tests__/Message.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ describe('Context', () => {
expect(o.length).toBe(0)
})

test('Always render Circle avatars for embed', () => {
test('Always render Circle avatars', () => {
const a = <Avatar name="Mugatu" shape="square" />
const wrapper = mount(
<Message.Provider theme="embed">
<Message.Provider>
<Message avatar={a} showAvatar from />
</Message.Provider>
)
Expand All @@ -220,6 +220,19 @@ describe('Context', () => {

expect(o.prop('shape')).toBe('circle')
})

test('Always render size xxs for embed', () => {
const a = <Avatar name="Mugatu" shape="square" />
const wrapper = mount(
<Message.Provider theme="embed">
<Message avatar={a} showAvatar from />
</Message.Provider>
)

const o = wrapper.find(Avatar)

expect(o.prop('size')).toBe('xxs')
})
})
})

Expand Down
2 changes: 1 addition & 1 deletion src/components/StatusAvatar/StatusAvatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Props = {
class StatusAvatar extends Component<Props> {
static defaultProps = {
isOnline: true,
shape: 'rounded',
shape: 'circle',
size: 'smmd',
}

Expand Down

0 comments on commit c56b699

Please sign in to comment.