Skip to content

Commit 7437d60

Browse files
committed
add animation prop
1 parent df97713 commit 7437d60

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

components/IonPage.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
export const ionViewDidEnter = () => {};
99
export const ionViewWillLeave = undefined; // unsupported as we cannot use beforeNavigate in npm library
1010
export const ionViewDidLeave = () => {};
11-
export let fly = {in: { x: 1000, duration: 300 }, out: { x: -1000, duration: 300 }};
11+
export let animation = {in: { x: 1000, duration: 300 }, out: { x: -1000, duration: 300 }};
1212
1313
ionViewWillEnter();
1414
@@ -35,8 +35,8 @@
3535

3636
<div
3737
class="ion-page"
38-
in:fly={fly.in}
39-
out:fly={fly.out}
38+
in:fly={animation.in}
39+
out:fly={animation.out}
4040
>
4141
<slot />
4242
</div>

src/IonPage.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
export const ionViewDidEnter = () => {};
99
export const ionViewWillLeave = undefined; // unsupported as we cannot use beforeNavigate in npm library
1010
export const ionViewDidLeave = () => {};
11+
export let animation = {in: { x: 1000, duration: 300 }, out: { x: -1000, duration: 300 }};
1112
1213
ionViewWillEnter();
1314
@@ -30,12 +31,12 @@
3031
3132
ionViewDidLeave();
3233
});
33-
// in:fly={{ x: 1000, duration: 300 }}
34-
// out:fly={{ x: -1000, duration: 300 }}
3534
</script>
3635

3736
<div
3837
class="ion-page"
38+
in:fly={animation.in}
39+
out:fly={animation.out}
3940
>
4041
<slot />
4142
</div>

0 commit comments

Comments
 (0)