-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(lemon-ui): fix lemon toast overflow #19391
Conversation
Size Change: +9.3 kB (0%) Total Size: 2 MB
|
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit but otherwise great
@@ -44,7 +44,7 @@ export interface ToastContentProps { | |||
export function ToastContent({ type, message, button, id }: ToastContentProps): JSX.Element { | |||
return ( | |||
<div className="flex items-center" data-attr={`${type}-toast`}> | |||
<span className="grow">{message}</span> | |||
<span className="grow overflow-hidden text-ellipsis">{message}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text-ellipsis won't do anything without whitespace-nowrap
right? (the truncate
util contains all this but not sure if we actually want this as then it would only be one line...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem
One of our most common error toasts has an overflow issue:
Changes
This PR fixes the issue and adds the toast to Storybook. I couldn't convince Storybook to capture them correctly though...
How did you test this code?
👀