Skip to content

Commit 43c153a

Browse files
authored
Merge pull request #420 from storybookjs/jarel/ap-2134-tooltips-can-overflow
Update Tooltips to use Word Break on long words
2 parents 176e055 + ac61780 commit 43c153a

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/components/tooltip/TooltipMessage.stories.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ export const withCustomClass = () => {
6767
};
6868

6969
withCustomClass.storyName = 'with custom className';
70+
71+
export const BreakWord = {
72+
render: () => (
73+
<TooltipMessage desc="App for repository github:sfdjglbnfslgbnbdsoiufbgdfjbdfsljbdflibsdfsfdhdfhfgdhfdgfbjdslf= already exists" />
74+
),
75+
};

src/components/tooltip/TooltipMessage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const MessageWrapper = styled.div`
2929
padding: 15px;
3030
width: 280px;
3131
box-sizing: border-box;
32+
word-break: break-word;
3233
`;
3334

3435
export function TooltipMessage({

0 commit comments

Comments
 (0)