File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
pages/pattern-lab/_patterns/06-experiments/with-without Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import './pages/pattern-lab/_patterns/02-components/card/__tests__';
7
7
// import './pages/pattern-lab/_patterns/01-styleguide/100-rendering-performance/lazy-lit-test';
8
8
import './pages/pattern-lab/_patterns/04-pages/99999-bolt-dev-sandbox/editor-integration' ;
9
9
import { enableAnimDemos } from './pages/pattern-lab/_patterns/06-experiments/animate/animate-demo-helpers.js' ;
10
+ import './pages/pattern-lab/_patterns/06-experiments/with-without/overlay-demo.js' ;
10
11
11
12
enableAnimDemos ( ) ;
12
13
Original file line number Diff line number Diff line change
1
+ <bolt -button onclick =" triggerOverlayFade()" class =" u-bolt-margin-bottom-large" style =" z-index: 9999999999; position: relative;" >Trigger Overlay Fade-Out with triggerAnimationOut</bolt -button >
2
+
3
+ <bolt -button onclick =" window.triggerOverlayDemoFadeOut()" class =" u-bolt-margin-bottom-large" style =" z-index: 9999999999; position: relative;" >Trigger Overlay Fade-Out with triggerAnims</bolt -button >
4
+
5
+ <bolt -animate class =" c-pega-wwo__modal-bg--animator" show-meta group =" initial" out =" fade-out" out-duration =" 1500" >
6
+ <div class =" c-pega-wwo__modal-bg" ></div >
7
+ </bolt -animate >
8
+
9
+ <script >
10
+ function triggerOverlayFade () {
11
+ const overlay = document .querySelector (' .c-pega-wwo__modal-bg--animator' );
12
+
13
+ if (overlay) {
14
+ overlay .triggerAnimOut ();
15
+ }
16
+ }
17
+ </script >
Original file line number Diff line number Diff line change
1
+ import { triggerAnims } from '@bolt/components-animate/utils' ;
2
+
3
+ window . triggerOverlayDemoFadeOut = ( ) => {
4
+ const overlay = document . querySelector ( '.c-pega-wwo__modal-bg--animator' ) ;
5
+ console . log ( 'called triggerOverlayDemoFadeOut' ) ;
6
+ try {
7
+ if ( overlay ) {
8
+ triggerAnims ( {
9
+ animEls : Array . from ( [ overlay ] ) ,
10
+ stage : 'OUT' ,
11
+ debug : true ,
12
+ } ) ;
13
+ } else {
14
+ throw new Error ( 'with/without overlay not found' ) ;
15
+ }
16
+ } catch ( $e ) {
17
+ console . error ( $e ) ;
18
+ }
19
+ } ;
You can’t perform that action at this time.
0 commit comments