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 all 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 @@ -27,6 +27,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Correctly apply static styles if the first `Provider` rendered is RTL @miroslavstastny ([#960](https://github.com/stardust-ui/react/pull/960))
- 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 `delay` prop for `Loader` component @layershifter ([#969](https://github.com/stardust-ui/react/pull/969))
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