You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a generic Title component that already include a close X button on the top right of my Dialog/Modal.
I used the Dialog.Overlay component to be rendered as the button. So it closes the modal when the user clicks on it but it doesn't feel right and is not straightforward.
Maybe it would be better to have a Dialog.Close component that already is rendered as a button by default and on click closes the modal. Or export the useModalContext so we could create the close component.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I want to create a generic Title component that already include a close X button on the top right of my Dialog/Modal.
I used the
Dialog.Overlay
component to be rendered as the button. So it closes the modal when the user clicks on it but it doesn't feel right and is not straightforward.Maybe it would be better to have a Dialog.Close component that already is rendered as a button by default and on click closes the modal. Or export the useModalContext so we could create the close component.
Beta Was this translation helpful? Give feedback.
All reactions