Skip to content

Commit e2efa55

Browse files
TommertomTommertom
Tommertom
authored and
Tommertom
committed
2 parents 8838263 + ceabea5 commit e2efa55

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

components/IonPage.svelte

Lines changed: 6 additions & 1 deletion
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
@@ -32,6 +33,10 @@
3233
});
3334
</script>
3435

35-
<div class="ion-page" in:fly={{ x: 1000, duration: 300 }} out:fly={{ x: -1000, duration: 300 }}>
36+
<div
37+
class="ion-page"
38+
in:fly={animation.in}
39+
out:fly={animation.out}
40+
>
3641
<slot />
3742
</div>

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { initialize } from "@ionic/core/components";
2020
import type { IonicConfig } from "@ionic/core/components";
2121

2222
import { defineIonComponents } from "./components/defineComponents";
23-
import { MenuI } from "@ionic/core/dist/types/components/menu/menu-interface";
23+
import type { MenuI } from "@ionic/core/dist/types/interface";
2424
export { defineComponent } from "./components/defineComponents";
2525

2626
// all exports

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
"svelte": "^3.55.1"
3232
},
3333
"dependencies": {
34-
"@ionic/core": "^7.0.2"
34+
"@ionic/core": "^7.0.3"
3535
}
36-
}
36+
}

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
@@ -34,8 +35,8 @@
3435

3536
<div
3637
class="ion-page"
37-
in:fly={{ x: 1000, duration: 300 }}
38-
out:fly={{ x: -1000, duration: 300 }}
38+
in:fly={animation.in}
39+
out:fly={animation.out}
3940
>
4041
<slot />
4142
</div>

0 commit comments

Comments
 (0)