Skip to content

Commit

Permalink
Tooltip : updated tooltip styles (#28264)
Browse files Browse the repository at this point in the history
* updated tooltip styles

* updated style as per review comments

* updated comment and added vr test
  • Loading branch information
kkakroo authored Jun 20, 2023
1 parent 9b5b3f3 commit 64fb6d6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
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

0 comments on commit 64fb6d6

Please sign in to comment.