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

feat(dialog): implement critical variant #870

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

AykutSarac
Copy link
Member

Related to #853

Implements critical dialog functionality to prevent closing and hides the close button for critical dialogs.

  • Adds a critical property to bl-dialog to mark dialogs as critical, which disables closing through keyboard, backdrop, and close button interactions.
  • Conditionally renders the close button in the dialog header based on the critical property, effectively hiding it for critical dialogs.
  • Updates event handling to prevent closing critical dialogs through escape key presses and outside clicks.
  • Includes a new story in bl-dialog.stories.ts to demonstrate a critical dialog with the critical property set to true.
  • Adds tests in bl-dialog.test.ts to verify that critical dialogs cannot be closed through keyboard, backdrop, and close button interactions, and to ensure the close button is hidden for critical dialogs.

@AykutSarac AykutSarac requested review from a team, ogunb and DamlaDemir and removed request for a team May 14, 2024 08:54
@buseselvi buseselvi merged commit 3373a39 into next May 16, 2024
7 checks passed
@buseselvi buseselvi deleted the feat/critical-dialog branch May 16, 2024 11:28
Copy link

🎉 This PR is included in version 3.0.0-beta.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants