Skip to content
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
14 changes: 14 additions & 0 deletions apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ storiesOf('Tooltip Converged', module)
<button>Target</button>
</Tooltip>
</div>
))
.addStory('overflow-wrap', () => (
<div className={useStyles().wrapper}>
<Tooltip visible content="Thistooltiptextislongenoughtobebrokenintoanewline" relationship="description">
<button>Target</button>
</Tooltip>
</div>
))
.addStory('overflow-wrap withArrow', () => (
<div className={useStyles().wrapper}>
<Tooltip visible withArrow content="Thistooltiptextislongenoughtobebrokenintoanewline" relationship="description">
<button>Target</button>
</Tooltip>
</div>
));

const TooltipPositioning: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: added overflowWrap to make sure content does not exceed the tooltip container and added vr test for the same",
"packageName": "@fluentui/react-tooltip",
"email": "kakrookaran@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const useStyles = makeStyles({
fontFamily: tokens.fontFamilyBase,
fontSize: tokens.fontSizeBase200,
lineHeight: tokens.lineHeightBase200,
overflowWrap: 'break-word',

...shorthands.borderRadius(tokens.borderRadiusMedium),
...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),
Expand Down