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

fix(Button): content shorthand as element was not truncating the text inside #551

Merged
merged 8 commits into from
Dec 4, 2018
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 @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixes
- Add `react-dom` as available import in the editor @mnajdova ([#553](https://github.com/stardust-ui/react/pull/553))
- Fix incorrect and missing filled or outline versions of Teams SVG icons @codepretty ([#552](https://github.com/stardust-ui/react/pull/552))
- Fix truncate styles in Teams team for the `Button`'s `content` prop used as element @mnajdova ([#551](https://github.com/stardust-ui/react/pull/551))

### Features
- Add `render` callback as an option for shorthand value @kuzhelov ([#519](https://github.com/stardust-ui/react/pull/519))
Expand Down
5 changes: 2 additions & 3 deletions src/themes/teams/components/Button/buttonStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,8 @@ const buttonStyles: ComponentSlotStylesInput<ButtonProps & ButtonState, any> = {
}
},

content: ({ props }) => ({
overflow: 'hidden',
...(typeof props.content === 'string' && truncateStyle),
content: () => ({
...truncateStyle,
}),
}

Expand Down