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

Add support to disable cancel button #68

Merged
merged 3 commits into from
Jan 23, 2023

Conversation

btmluiz
Copy link
Contributor

@btmluiz btmluiz commented Jan 23, 2023

The following options have been added:

  • disableCancelButton

if disableCancelButton is true then the cancel button is not rendered, case disabeleCancelButton is false or undefined then the cancel button is rendered.

@jonatanklosko
Copy link
Owner

What is the use case for no cancel button? The user can still close the dialog by hitting on the overlay, so having a more accessible cancel button generally makes sense.

@btmluiz
Copy link
Contributor Author

btmluiz commented Jan 23, 2023

The use case is to use with allowClose option where the dialog will close only if the user confirms, making the confirmation mandatory.

An example is to show the user a secret_key where it will only be visable at that moment, in this case a cancel button is not necessary.

@jonatanklosko
Copy link
Owner

Ok! Let's rename the option to hideCancelButton, so it's not confused with disabled button state :)

@btmluiz
Copy link
Contributor Author

btmluiz commented Jan 23, 2023

@jonatanklosko renamed!

README.MD updated as well

@jonatanklosko
Copy link
Owner

Let's also add a default here:

confirmationKeywordTextFieldProps: {},

and this is good to go :)

@jonatanklosko jonatanklosko merged commit 80e3a4d into jonatanklosko:master Jan 23, 2023
@jonatanklosko
Copy link
Owner

Published as v3.0.8 :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants