Closed cielecki closed 1 year ago
I will replace the current leaveAnimation value with a new object that has properties and values that are the exact reverse of the enterAnimation.
leaveAnimation
enterAnimation
REPLACE leaveAnimation="elevator" WITH leaveAnimation={{ from: { transform: "translateY(0)", animationTimingFunction: "cubic-bezier(0, 0, 0.2, 1)", opacity: "1", }, to: { transform: "translateY(-10%)", animationTimingFunction: "cubic-bezier(0.8, 0, 1, 1)", opacity: "0.1", }, }} END_REPLACE
to:
import * as React from "react"; import FlipMove from "react-flip-move"; import { MinionTaskComponent } from "./MinionTaskComponent"; import { MinionTaskUIInfo } from "./MinionTaskUIInfo";
export function MinionTaskListComponent({ executionList }: { executionList: MinionTaskUIInfo[]; }) { return ( <FlipMove enterAnimation={{ from: { transform: "translateY(-10%)", animationTimingFunction: "cubic-bezier(0.8, 0, 1, 1)", opacity: "0.1", }, to: { transform: "translateY(0)", animationTimingFunction: "cubic-bezier(0, 0, 0.2, 1)", opacity: "1", }, }} leaveAnimation="elevator"
{executionList.length === 0 && ( No minions are active. )}
{executionList.length === 0 && (
)}
{executionList.map((execution) => ( <MinionTaskComponent key={execution.id} minionTask={execution} /> ))} </FlipMove>
); }
Added to tests
I will replace the current
leaveAnimation
value with a new object that has properties and values that are the exact reverse of theenterAnimation
.REPLACE leaveAnimation="elevator" WITH leaveAnimation={{ from: { transform: "translateY(0)", animationTimingFunction: "cubic-bezier(0, 0, 0.2, 1)", opacity: "1", }, to: { transform: "translateY(-10%)", animationTimingFunction: "cubic-bezier(0.8, 0, 1, 1)", opacity: "0.1", }, }} END_REPLACE
to:
import * as React from "react"; import FlipMove from "react-flip-move"; import { MinionTaskComponent } from "./MinionTaskComponent"; import { MinionTaskUIInfo } from "./MinionTaskUIInfo";
export function MinionTaskListComponent({ executionList }: { executionList: MinionTaskUIInfo[]; }) { return ( <FlipMove enterAnimation={{ from: { transform: "translateY(-10%)", animationTimingFunction: "cubic-bezier(0.8, 0, 1, 1)", opacity: "0.1", }, to: { transform: "translateY(0)", animationTimingFunction: "cubic-bezier(0, 0, 0.2, 1)", opacity: "1", }, }} leaveAnimation="elevator"
); }