Skip to content

Commit b703163

Browse files
authored
[Tooltip] Allow overflow for non-breaking content (#1395)
* Allow overflow * Add changelog entry
1 parent 9896317 commit b703163

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

UNRELEASED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
1818

1919
### Bug fixes
2020

21+
- Allow `Tooltip` content to wrap no nonbreaking strings [#1395](https://github.com/Shopify/polaris-react/pull/1395)
2122
- Fixed `Checkbox` being toggled when disabled ([#1369](https://github.com/Shopify/polaris-react/pull/1369))
2223
- Fixed `DropZone.FileUpload` from incorrectly displaying action hint and title when the default is used and removed ([#1233](https://github.com/Shopify/polaris-react/pull/1233))
2324
- Fixed `ResourceList.Item` interaction states from being incorrectly applied ([#1312](https://github.com/Shopify/polaris-react/pull/1312)

src/components/Tooltip/Tooltip.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ $content-max-width: rem(200px);
3838

3939
.Content {
4040
position: relative;
41-
margin-top: spacing(extra-tight);
4241
border-radius: border-radius();
4342
max-width: $content-max-width;
4443
max-height: $content-max-height;
4544
}
4645

4746
.Label {
48-
padding: 0 spacing(tight) spacing(extra-tight);
47+
padding: spacing(extra-tight) spacing(tight);
48+
word-break: break-word;
4949
}

src/components/Tooltip/components/TooltipOverlay/TooltipOverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default class TooltipOverlay extends React.PureComponent<Props, never> {
5151
positioning === 'above' && styles.positionedAbove,
5252
);
5353

54-
const contentStyles = measuring ? undefined : {maxHeight: desiredHeight};
54+
const contentStyles = measuring ? undefined : {minHeight: desiredHeight};
5555

5656
return (
5757
<div className={containerClassName} {...layer.props}>

0 commit comments

Comments
 (0)