-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(web-twig): Introduce optional uniform appearance of
Modal
Add `spirit-feature-modal-enable-uniform-dialog` feature class to enable uniform appearance of `Modal` across all breakpoints. Current mobile design is then accessible using the `isDockedOnMobile` property.
- Loading branch information
1 parent
bb7d413
commit c5ff3bc
Showing
6 changed files
with
120 additions
and
18 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
4 changes: 3 additions & 1 deletion
4
packages/web-twig/src/Resources/components/Modal/ModalDialog.twig
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
77 changes: 77 additions & 0 deletions
77
packages/web-twig/src/Resources/components/Modal/stories/ModalUniformModalOnMobile.twig
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<div class="spirit-feature-modal-enable-uniform-dialog" style="display: contents"><!-- Set `display: contents` to enable parent stack layout. --> | ||
<Button data-spirit-toggle="modal" data-spirit-target="#example-uniform"> | ||
Open Modal | ||
</Button> | ||
|
||
<Button data-spirit-toggle="modal" data-spirit-target="#example-docked"> | ||
Open Docked Modal (mobile only) | ||
</Button> | ||
|
||
<Modal id="example-uniform" titleId="example-uniform-title"> | ||
<ModalDialog> | ||
<ModalHeader modalId="example-uniform" titleId="example-uniform-title"> | ||
Modal Title | ||
</ModalHeader> | ||
<ModalBody> | ||
|
||
<!-- Content: start --> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam at excepturi laudantium magnam mollitia | ||
perferendis reprehenderit, voluptate. Cum delectus dicta ducimus eligendi excepturi natus perferendis | ||
provident unde. Eveniet, iste, molestiae? | ||
</p> | ||
<!-- Content: end --> | ||
|
||
</ModalBody> | ||
<ModalFooter description="Optional description"> | ||
<Button | ||
data-spirit-dismiss="modal" | ||
data-spirit-target="#example-uniform" | ||
> | ||
Primary action | ||
</Button> | ||
<Button | ||
color="secondary" | ||
data-spirit-dismiss="modal" | ||
data-spirit-target="#example-uniform" | ||
> | ||
Secondary action | ||
</Button> | ||
</ModalFooter> | ||
</ModalDialog> | ||
</Modal> | ||
|
||
<Modal id="example-docked" titleId="example-docked-title"> | ||
<ModalDialog isDockedOnMobile> | ||
<ModalHeader modalId="example-docked" titleId="example-docked-title"> | ||
Modal Title | ||
</ModalHeader> | ||
<ModalBody> | ||
|
||
<!-- Content: start --> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam at excepturi laudantium magnam mollitia | ||
perferendis reprehenderit, voluptate. Cum delectus dicta ducimus eligendi excepturi natus perferendis | ||
provident unde. Eveniet, iste, molestiae? | ||
</p> | ||
<!-- Content: end --> | ||
|
||
</ModalBody> | ||
<ModalFooter description="Optional description"> | ||
<Button | ||
data-spirit-dismiss="modal" | ||
data-spirit-target="#example-docked" | ||
> | ||
Primary action | ||
</Button> | ||
<Button | ||
color="secondary" | ||
data-spirit-dismiss="modal" | ||
data-spirit-target="#example-docked" | ||
> | ||
Secondary action | ||
</Button> | ||
</ModalFooter> | ||
</ModalDialog> | ||
</Modal> | ||
</div> |