|
|
@@ -9,6 +9,8 @@
|
|
|
<style>
|
|
|
/* Keep Layer above the doc UI */
|
|
|
.layer-overlay { z-index: 99999; }
|
|
|
+ /* Allow larger widths for this demo */
|
|
|
+ .layer-popup { max-width: none; }
|
|
|
</style>
|
|
|
<style>
|
|
|
.controls {
|
|
|
@@ -341,15 +343,19 @@ function openSteps(mode) {
|
|
|
const b = BACKGROUNDS.image;
|
|
|
|
|
|
const code = `Layer.$({
|
|
|
- title: 'Step 1',
|
|
|
- text: 'Background should follow when different.',
|
|
|
- background: ${mode === 'same' ? 'same' : 'a'},
|
|
|
theme: 'light',
|
|
|
icon: ${showIcon ? "'info'" : 'null'},
|
|
|
popupAnimation: ${popupAnimation},
|
|
|
closeOnEsc: ${closeOnEsc},
|
|
|
showCancelButton: true
|
|
|
})
|
|
|
+.step({
|
|
|
+ title: 'Step 1',
|
|
|
+ text: 'Background should follow when different.',
|
|
|
+ background: ${mode === 'same' ? 'same' : 'a'},
|
|
|
+ width: '55em',
|
|
|
+ height: '14em'
|
|
|
+})
|
|
|
.step({
|
|
|
title: 'Step 2',
|
|
|
text: 'Swipe left/right to see background transition.',
|
|
|
@@ -358,7 +364,9 @@ function openSteps(mode) {
|
|
|
.step({
|
|
|
title: 'Step 3',
|
|
|
text: 'Back to the first background.',
|
|
|
- background: ${mode === 'same' ? 'same' : 'a'}
|
|
|
+ background: ${mode === 'same' ? 'same' : 'a'},
|
|
|
+ width: '48em',
|
|
|
+ height: '11em'
|
|
|
})
|
|
|
.run();`;
|
|
|
setJsCode(code.replace(/\b(same|a|b)\b/g, (m) => {
|
|
|
@@ -368,15 +376,19 @@ function openSteps(mode) {
|
|
|
}));
|
|
|
|
|
|
Layer.$({
|
|
|
- title: 'Step 1',
|
|
|
- text: 'Background should follow when different.',
|
|
|
- background: mode === 'same' ? same : a,
|
|
|
theme: 'light',
|
|
|
icon: showIcon ? 'info' : null,
|
|
|
popupAnimation,
|
|
|
closeOnEsc,
|
|
|
showCancelButton: true
|
|
|
})
|
|
|
+ .step({
|
|
|
+ title: 'Step 1',
|
|
|
+ text: 'Background should follow when different.',
|
|
|
+ background: mode === 'same' ? same : a,
|
|
|
+ width: '55em',
|
|
|
+ height: '14em'
|
|
|
+ })
|
|
|
.step({
|
|
|
title: 'Step 2',
|
|
|
text: 'Swipe left/right to see background transition.',
|
|
|
@@ -385,7 +397,9 @@ function openSteps(mode) {
|
|
|
.step({
|
|
|
title: 'Step 3',
|
|
|
text: 'Back to the first background.',
|
|
|
- background: mode === 'same' ? same : a
|
|
|
+ background: mode === 'same' ? same : a,
|
|
|
+ width: '48em',
|
|
|
+ height: '11em'
|
|
|
})
|
|
|
.run();
|
|
|
}
|