Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(ChatMessage): adjust styles for Teams theme #986

Merged
merged 5 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix allow `Text` component when rendered as div to behave as block element in Teams theme @mnajdova ([#940](https://github.com/stardust-ui/react/pull/940))
- Fix font-based `Icon` styles in Teams theme @kuzhelov ([#976](https://github.com/stardust-ui/react/pull/976))
- Refactor the `ListItem` component to use the `Flex` components instead of `ItemLayout` @mnajdova ([#886](https://github.com/stardust-ui/react/pull/886))
- Fixed distance of the `content` and `reactionGroup` from the `badge` in the `ChatMessage` component for Teams theme @mnajdova ([#986](https://github.com/stardust-ui/react/pull/986))

### Features
- Add `Reaction` and `ReactionGroup` components @mnajdova ([#959](https://github.com/stardust-ui/react/pull/959))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ const chatMessageStyles: ComponentSlotStylesInput<
color: v.contentFocusOutlineColor,
textDecoration: 'underline',
},
...(p.badge &&
p.badgePosition === 'end' && {
marginRight: pxToRem(4),
}),
}),
badge: ({ props: p, variables: v }) => {
const sidePosition = p.badgePosition === 'start' ? 'left' : 'right'
Expand All @@ -113,8 +117,12 @@ const chatMessageStyles: ComponentSlotStylesInput<
transform: p.badgePosition === 'start' ? 'translateX(-50%)' : 'translateX(50%)',
}
},
reactionGroup: ({ variables: v }) => ({
reactionGroup: ({ props: p, variables: v }) => ({
marginLeft: v.reactionGroupMarginLeft,
...(p.badge &&
p.badgePosition === 'end' && {
marginRight: pxToRem(2),
}),
float: 'right',
}),
}
Expand Down