Skip to content

Commit

Permalink
refactor: adjust motion trigger order
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Apr 21, 2023
1 parent c2185c8 commit ede6993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MotionThumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function MotionThumb(props: MotionThumbInterface) {
width: `var(--thumb-active-width)`,
};
};
const onAppearEnd = () => {
const onVisibleChanged = () => {
setPrevStyle(null);
setNextStyle(null);
onMotionEnd();
Expand All @@ -135,7 +135,7 @@ export default function MotionThumb(props: MotionThumbInterface) {
motionAppear
onAppearStart={onAppearStart}
onAppearActive={onAppearActive}
onAppearEnd={onAppearEnd}
onVisibleChanged={onVisibleChanged}
>
{({ className: motionClassName, style: motionStyle }, ref) => {
const mergedStyle = {
Expand Down

0 comments on commit ede6993

Please sign in to comment.