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

fix(modal): fixed a bug that disallowed users to set the position of a modal #766

Merged
merged 1 commit into from
May 30, 2023

Conversation

rtraficante
Copy link
Contributor

Description

The modal's position property is handled by the parent of the actual content box using flex, align-items, and justify-content but was blocked by the content box's property of "margin: auto" (m-auto). This fix deletes that property so the parent can correctly handle the position of the modal correctly.

Fixes #760

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I tested this change by running the documentation site locally and checking whether the property works correctly on the Modal component page.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@vercel
Copy link

vercel bot commented May 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2023 11:00am

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b472d85) 99.54% compared to head (6c04d0e) 99.54%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #766   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files         129      129           
  Lines        6537     6537           
  Branches      391      391           
=======================================
  Hits         6507     6507           
  Misses         30       30           
Impacted Files Coverage Δ
src/theme.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@tulup-conner tulup-conner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Can you rebase and move these changes to src/theme.ts? We just changed up our repository pretty substantially. You can see the new contributing guide here: https://github.com/themesberg/flowbite-react/blob/main/CONTRIBUTING.md

If you aren't comfortable rebasing, let me know and I'll be happy to do so for you.

@rtraficante
Copy link
Contributor Author

@tulup-conner I'm like 96% sure I did that correctly

@rluders rluders added this to the 1.0.0 milestone May 26, 2023
…a modal

The modal's position property is handled by the parent of the actual content box using flex, align
items, and justify content but was being blocked by the content box's proptery of margin: auto. This
fix deletes that margin: auto property so the parent can corrently handle the position of the modal
correctly.

Placement Attribute of the Modal Component doesn't work themesberg#760
@rluders rluders merged commit 5200ecd into themesberg:main May 30, 2023
@Sagar301101
Copy link

Hey I have just used size props for modal

  • for size sm, md and lg it is not working properly ( apart from this rest of size is working properly)
  • I have used the latest of flowbite-react ( 0.5.0)
  • please check this again

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.

Placement Attribute of the Modal Component doesn't work
4 participants