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

Commit c3cd60f

Browse files
authored
fix(Button): content shorthand as element was not truncating the text inside (#551)
* -fix truncate styling for the content when defined as element * -fix truncate styling for the content when defined as element as well as children API * -updated changelog * -fixed vertical alignment when icon is together with a content * -reverted changes for children API because of lots of regressions * -updated changelog
1 parent f9a1806 commit c3cd60f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2020
### Fixes
2121
- Add `react-dom` as available import in the editor @mnajdova ([#553](https://github.com/stardust-ui/react/pull/553))
2222
- Fix incorrect and missing filled or outline versions of Teams SVG icons @codepretty ([#552](https://github.com/stardust-ui/react/pull/552))
23+
- 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))
2324

2425
### Features
2526
- Add `render` callback as an option for shorthand value @kuzhelov ([#519](https://github.com/stardust-ui/react/pull/519))

src/themes/teams/components/Button/buttonStyles.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,8 @@ const buttonStyles: ComponentSlotStylesInput<ButtonProps & ButtonState, any> = {
280280
}
281281
},
282282

283-
content: ({ props }) => ({
284-
overflow: 'hidden',
285-
...(typeof props.content === 'string' && truncateStyle),
283+
content: () => ({
284+
...truncateStyle,
286285
}),
287286
}
288287

0 commit comments

Comments
 (0)