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

Dialog is rendering a close button when no onClose is provided #1044

Closed
lyzadanger opened this issue May 22, 2023 · 0 comments · Fixed by #1045
Closed

Dialog is rendering a close button when no onClose is provided #1044

lyzadanger opened this issue May 22, 2023 · 0 comments · Fixed by #1045
Labels

Comments

@lyzadanger
Copy link
Contributor

Dialog supports a legacy use case of "non-closeable" modals. As such, the onClose prop is currently optional. When not provided, no close button should be rendered.

As of the addition of TransitionComponent support, there is always an internal close handler generated and, as such, a close button is always rendered. You can see a close button appearing even when no close callback is provided in one of the examples on the Dialog's pattern-library documentation page:

image

We shouldn't render a close button if no onClose is provided to Dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant