themesberg / flowbite-vue

Official Vue 3 components built for Flowbite and Tailwind CSS
https://flowbite-vue.com
MIT License
723 stars 116 forks source link

feat: add positioning options to FwbModal #293

Closed woodrunsdeep closed 1 week ago

woodrunsdeep commented 1 month ago

Currently FwbModal doesn't have position prop to control modal's placement on the screen. This PR adds this feature taking into consideration possible usage in RTL (Right-to-Left) mode.

  1. Modal's parent element is display: block and the position prop sets corresponding classes responsible for modal's alignment. Default position is center.
  2. There's a small fix of close button alignment in RTL mode - usage of logical property ms-auto instead of ml-auto.
  3. As was mentioned here on current implementation click outside (on top/under a modal specifically) doesn't close a modal. Fixed with this PR as well.

Closes: #279 #235

netlify[bot] commented 1 month ago

Deploy Preview for sensational-seahorse-8635f8 ready!

Name Link
Latest commit ef68d30688addce1470e058e183b7a11ee68def1
Latest deploy log https://app.netlify.com/sites/sensational-seahorse-8635f8/deploys/6676dd670bbda100080b21f6
Deploy Preview https://deploy-preview-293--sensational-seahorse-8635f8.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

woodrunsdeep commented 1 month ago

Although maybe I should have used Flowbite's implementation to be in line with the core lib:

But I think we should keep logical prop value names (top-start, bottom-end, etc.) instead of Flowbite's top-left, bottom-right cause in RTL mode top-left will place a model to the top right corner.

@Sqrcz If my assumptions are correct please let me know and I'll do the rest.

fdeitelhoff commented 1 month ago

Thanks for the fix.

Any updates on a publish timeline? This would be a nice feature for a project right now. :) Or can I update the files manually, until a new version is ready?

Thanks!

woodrunsdeep commented 1 month ago

@Sqrcz @cogor

Hi. It's been a while since this PR was created. I would appreciate your feedback on it.

Thanks

cogor commented 1 month ago

@Sqrcz @cogor

Hi. It's been a while since this PR was created. I would appreciate your feedback on it.

Thanks

Sorry, unfortunately I don't have much time for OS, but I'll do a review your PR ASAP