Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Commit 4bcd70d

Browse files
Andries SmitAndries-Smit
authored andcommitted
feat(animation): add warning for unused animation
1 parent a049003 commit 4bcd70d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages-native/animation/src/Animation.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ export class Animation extends Component<Props> {
5151
if (animationType === "out" && animationOut === "none") {
5252
this.log("No 'Exit animation' is selected for animation type 'Exit'");
5353
}
54+
if (animationType === "in" && (animationOut !== "none" || animationAttention !== "none")) {
55+
this.log(
56+
"The 'Attention' an 'Exit' animation is ignored and should be set to 'None' when effect 'type' 'Entry' is selected"
57+
);
58+
}
59+
if (animationType === "attention" && (animationOut !== "none" || animationIn !== "none")) {
60+
this.log(
61+
"The 'Entrance' and 'Exit' animation is ignored and should be set to 'None' when effect 'type' 'Attention' is selected"
62+
);
63+
}
64+
if (animationType === "out" && (animationIn !== "none" || animationAttention !== "none")) {
65+
this.log(
66+
"The 'Entry' and 'Attention' animation is ignored and should be set to 'None' when effect 'type' 'Exit' is selected"
67+
);
68+
}
5469
}
5570

5671
private log(message: string): void {

0 commit comments

Comments
 (0)