Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit 856134a

Browse files
committed
remove default export for FadeInOut
1 parent f9ada2b commit 856134a

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/primitives/FadeInOut.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,27 @@ export function fadeOut(el: ElementNode): Promise<void> {
2727
return el.animate(ALPHA_NONE).start().waitUntilStopped();
2828
}
2929

30-
export default function FadeInOut(props: Props & NodeProps) {
30+
export function FadeInOut(props: Props & NodeProps) {
3131
const config = Object.assign({}, DEFAULT_PROPS, props.transition);
3232
function onCreate(elm: ElementNode) {
3333
elm.alpha = 0;
34-
elm.animate({ alpha: 1 }, { duration: config.duration, easing: config.easing }).start();
34+
elm
35+
.animate(
36+
{ alpha: 1 },
37+
{ duration: config.duration, easing: config.easing },
38+
)
39+
.start();
3540
}
3641

3742
function onDestroy(elm: ElementNode) {
3843
elm.rtt = true;
39-
return elm.animate({ alpha: 0 }, { duration: config.duration, easing: config.easing }).start().waitUntilStopped();
44+
return elm
45+
.animate(
46+
{ alpha: 0 },
47+
{ duration: config.duration, easing: config.easing },
48+
)
49+
.start()
50+
.waitUntilStopped();
4051
}
4152

4253
return (

0 commit comments

Comments
 (0)