Skip to content

feat: add size storage classes to Modal component - #650

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Faromzy:feat/modal-size-classes
Jun 1, 2026
Merged

feat: add size storage classes to Modal component#650
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Faromzy:feat/modal-size-classes

Conversation

@Faromzy

@Faromzy Faromzy commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

feat: add size storage classes to Modal component

Implements a declarative size prop on the Modal component to replace the
previous pattern of overriding width via className.

Changes:

  • Added ModalSize type (sm | md | lg | xl | full) and a SIZE_CLASSES map as the
    single source of truth
  • Replaced hardcoded max-w-md with SIZE_CLASSES[size], defaulting to md (no
    breaking change)
  • Updated ShareModal to use size="md" instead of className="max-w-md"
  • Added 12 unit tests covering all size classes, default behaviour, close
    paths, and className merging

Testing: All 12 tests pass (vitest)

Closes #478

- Add ModalSize type (sm | md | lg | xl | full) and SIZE_CLASSES map
- Replace hardcoded max-w-md with size prop (default: md)
- Update ShareModal to use size prop instead of className override
- Add 12 unit tests covering all size classes and close paths
@drips-wave

drips-wave Bot commented Jun 1, 2026

Copy link
Copy Markdown

@Faromzy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 69e5f20 into rinafcode:main Jun 1, 2026
4 of 6 checks passed
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.

security Modal Dialogs : Storage Classes

2 participants