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
Modals: allow per instance override of button text (ex: Confirm yes/no) #683
Comments
In a similar vein, it would be nice to be able to select other types of Possibly the "type" property in ModalSettings could be extended ('prompt' for the current text input, plus 'date', 'number', 'tel', 'email', 'password', etc.) I do realize that this might not make sense for 'checkbox', 'radio', 'color'... |
Very much agreed, this will be a similar change so I'll make it happen. Thanks for the suggestion! |
See also: #693 |
FYI I've updated to support overriding the buttons per the original request. This will be provided via a new PR in a moment. @fsrtechnologies Unfortunately Svelte doesn't seem to support your request given we use I could do something hacky like creating a set of if/else blocks for each type we wish to support, but then I'd be repeating the input code over and over in each one - just with the type changed. That seems annoying. I'd welcome other ideas though! |
The PR is available here to test and provide feedback Preview URL: |
Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!
Another great idea inspired by @huntabyte
Use case is someone wanting to use a preset confirm type dialog. In addition to the response callback, we should allow the confirm/cancel button text to be overwritten per instance. This would take precedence over the default set by the Modal props.
What type of pull request would this be?
Enhancement
Any links to similar examples or other references we should review?
https://www.skeleton.dev/utilities/modals
The text was updated successfully, but these errors were encountered: