react-ui-org / react-ui

React UI is a themeable and performant UI library for React apps.
https://react-ui.io
MIT License
21 stars 7 forks source link

Re-implement `Modal` component using HTMLDialogElement (#461) #544

Open bedrich-schindler opened 5 months ago

bedrich-schindler commented 5 months ago

Closes #461, closes #537.

bedrich-schindler commented 5 months ago

Update CSS properties in README.md.

Done ✅

bedrich-schindler commented 1 month ago

PR updated:

 Introduced allowCloseOnBackdropClick and allowCloseOnEscapeKey prop, both set to true by default. It allows end-user to configure modal in such way that he/she can prevent closing by clicking on backdrop or pressing Escape key.  Improved blocking of firing click events on primary and close button as there were missing conditions checking whether the button is disabled (it was there for a long time)

While I introduces allowCloseOnBackdropClick and allowCloseOnEscapeKey, I am thinking about allowProceedOnEnterKey (or something like that) to disable Enter functionality which can be unwanted in some scenarios.

bedrich-schindler commented 1 month ago

Just for info, tests need to be updated in https://github.com/react-ui-org/react-ui/pull/545 as new test environment is necessary.