-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dialog): implement critical variant (#870)
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.
- Loading branch information
1 parent
f2deab2
commit 3373a39
Showing
4 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters