Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ToolTip single word wrap #3019

Merged
merged 6 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions packages/gamut/src/Tip/shared/elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
const tipWrapperStyles = {
position: 'relative',
display: 'inline-flex',
overflowWrap: 'break-word',
} as const;

export const ToolTipWrapper = styled.div(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const meta: Meta<typeof InfoTip> = {
component: InfoTip,
args: {
alignment: 'top-left',
info: `I am additional information about a nearby element or content.`,
info: `I just saw a really scary ghost! Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ah ahh!!`,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const WithIconButton: Story = {
render: () => (
<FlexBox justifyContent="space-around" m={24} width="95%">
<IconButton
tip="Beautify your code"
tip="I just saw a really scary ghost! Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ah ahh!!"
icon={SparkleIcon}
tipProps={{ alignment: 'bottom-center' }}
/>
Expand All @@ -49,7 +49,7 @@ export const Floating: Story = {
render: () => (
<IconButton
aria-label="Wonder"
tip="Wonder at the majesty of the universe"
tip="Wondereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
icon={SmileyStarEyesIcon}
tipProps={{ alignment: 'bottom-center', placement: 'floating' }}
/>
Expand Down
Loading