Skip to content

Commit 058d25f

Browse files
committed
feat(with-without): isolated background visual test for with/without for ie11 debugging
1 parent 3992a43 commit 058d25f

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

docs-site/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import './pages/pattern-lab/_patterns/02-components/card/__tests__';
77
// import './pages/pattern-lab/_patterns/01-styleguide/100-rendering-performance/lazy-lit-test';
88
import './pages/pattern-lab/_patterns/04-pages/99999-bolt-dev-sandbox/editor-integration';
99
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';
1011

1112
enableAnimDemos();
1213

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
};

0 commit comments

Comments
 (0)