-
Notifications
You must be signed in to change notification settings - Fork 3
ECHOES-891 Make toasts & modals compatible #614
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for echoes-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
0440a38 to
3ab8e31
Compare
|
|
|
||
| const ModalPortalRefContext = createContext<ModalPortalContextValue | null>(null); | ||
|
|
||
| export function ModalPortal({ children }: Readonly<PropsWithChildren>) { |
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.
NP: as ModalPortal is the "meat" of this file IMO and is imported directly, I feel the file should be called ModalPortal.tsx - WDYT?
| toast! | ||
| </Button> | ||
| } | ||
| description="Clicking on the button will add a toast message. This shows that they appear on top and can be interacted with without closing the modal" |
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.
pressing Esc still closes the modal and not the toast. This was already the case: toasts don't respond to Esc, but I'm now wondering if they should? 🤔




The easiest way to test this in SQ is to render a Modal that generates a toast anywhere in the app!