formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
97 stars 3 forks source link

Modal - Allow styling of Backdrop #229

Closed alexandertrefz closed 3 months ago

alexandertrefz commented 3 months ago

Describe the solution you'd like ~~I would like to lock the modal in place if a request is sent from it (If it is a confirmation for a CRUD API basically) while that request is in flight. I can disable the cancel button and turn the confirm button to loading but the modal stays dismissible via the backdrop.~~

Additionally it would also be great if we could pass attributes (or just the className, really) to the backdrop, so we could style it. (I would like to slightly blur it, for example)

blvdmitry commented 3 months ago

overlay classname: 👍

As for locking the dismissible action – won't it work already with the way Modal is set up? Since it's completely controlled – you're passing its onClose handler that controls when it gets closed. Is there something that prevents you from removing that handler by default and only change the modal state once the request was completed?

alexandertrefz commented 3 months ago

Apologies! In my testing of various things I must have forgotten to remove the onClose handler. That works just like I was imagining. A slightly more explicit description of this in the Documentation might be helpful.

blvdmitry commented 3 months ago

<Modal overlayClassName={...} /> should be available in 2.10.9. Documentation deployment will follow in the upcoming minor release 🔥