File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export function registerModals() {
66 function setupModal ( el : Element ) {
77 // Function to handle modal removal
88 function removeModalHandler ( ) {
9- modal ?. classList . remove ( "mg-show " ) ;
9+ modal ?. classList . remove ( "opened " ) ;
1010 }
1111
1212 // Select the modal and close button elements
@@ -16,7 +16,7 @@ export function registerModals() {
1616
1717 // Add event listener to the element to show modal on click
1818 el . addEventListener ( "click" , function ( _ : Event ) {
19- modal ?. classList . add ( "mg-show " ) ;
19+ modal ?. classList . add ( "opened " ) ;
2020 } ) ;
2121
2222 // Add event listener to the close button to remove modal on click
Original file line number Diff line number Diff line change 2121 background : rgb (0 0 0 / 70% );
2222 transition : opacity 0.3s ;
2323
24+ & .opened {
25+ opacity : 1 ;
26+ visibility : visible ;
27+ }
28+
2429 & >.mg-modal--content {
2530 background-color : $color-initial ;
2631 border-radius : $control-radius ;
6469 margin-left : -1rem ;
6570 }
6671
67- & .mg-show .mg-right >.mg-modal--content {
72+ & .opened .mg-right >.mg-modal--content {
6873 transform : translateX (-100vw );
6974 }
7075
71- & .mg-show .mg-left >.mg-modal--content {
76+ & .opened .mg-left >.mg-modal--content {
7277 transform : translateX (100vw );
7378 }
7479
75- & .mg-show .mg-top >.mg-modal--content {
80+ & .opened .mg-top >.mg-modal--content {
7681 transform : translateY (100vh );
7782 }
7883
79- & .mg-show .mg-bottom >.mg-modal--content {
84+ & .opened .mg-bottom >.mg-modal--content {
8085 transform : translateY (-100vh );
8186 }
8287}
You can’t perform that action at this time.
0 commit comments