1- import { StoryObj } from "@storybook/react-vite" ;
1+ import type { StoryObj } from "@storybook/react-vite" ;
22import React , { useCallback , useEffect , useState } from "react" ;
33import {
4- AnimationOptions ,
5- TypedEasing ,
6- TypedKeyframe ,
4+ type AnimationOptions ,
5+ type TypedEasing ,
6+ type TypedKeyframe ,
77 useAnimation ,
88} from "../../src" ;
99import { mergeRefs } from "react-merge-refs" ;
@@ -53,13 +53,13 @@ export const Playground: StoryObj = {
5353 easing === "cubic-bezier"
5454 ? `cubic-bezier(${ cubicBezierValues . join ( "," ) } )`
5555 : easing === "steps"
56- ? `steps(${ stepsValues . join ( "," ) } )`
57- : easing ,
56+ ? `steps(${ stepsValues . join ( "," ) } )`
57+ : easing ,
5858 direction : direction ,
5959 iterations : iteration ,
6060 delay,
6161 endDelay,
62- }
62+ } ,
6363 ) ;
6464
6565 useEffect ( ( ) => {
@@ -320,7 +320,7 @@ const Bar = ({
320320 target ,
321321 ]
322322 : [ target ] ,
323- { duration : 150 , easing : "ease-out" , delay : i * 100 }
323+ { duration : 150 , easing : "ease-out" , delay : i * 100 } ,
324324 ) ;
325325
326326 useEffect ( ( ) => {
@@ -402,7 +402,7 @@ export const Mouse: StoryObj = {
402402 duration : 1000 ,
403403 iterations : Infinity ,
404404 easing : "ease-in-out" ,
405- }
405+ } ,
406406 ) ;
407407 const move = useAnimation < { x : number ; y : number } > (
408408 ( prev , pos ) => [
@@ -412,7 +412,7 @@ export const Mouse: StoryObj = {
412412 {
413413 duration : 400 ,
414414 easing : "ease-in-out" ,
415- }
415+ } ,
416416 ) ;
417417
418418 useEffect ( ( ) => {
@@ -452,7 +452,7 @@ export const Toggle: StoryObj = {
452452 render : ( ) => {
453453 const animate = useAnimation (
454454 { transform : "translate3d(400px, 0, 0)" } ,
455- { duration : 800 , easing : "ease-in-out" }
455+ { duration : 800 , easing : "ease-in-out" } ,
456456 ) ;
457457
458458 useEffect ( ( ) => {
@@ -501,7 +501,7 @@ export const Path: StoryObj = {
501501 easing : "ease-in-out" ,
502502 iterations : Infinity ,
503503 direction : "alternate" ,
504- }
504+ } ,
505505 ) ;
506506
507507 useEffect ( ( ) => {
@@ -527,7 +527,7 @@ export const ThreeDimentional: StoryObj = {
527527 {
528528 duration : 1000 ,
529529 iterations : Infinity ,
530- }
530+ } ,
531531 ) ;
532532
533533 useEffect ( ( ) => {
@@ -611,7 +611,7 @@ export const Sequence: StoryObj = {
611611 render : ( ) => {
612612 const animate = useAnimation < string > (
613613 ( prev , color ) => [ { fill : prev . fill } , { fill : color } ] ,
614- { duration : 600 , easing : "ease-out" }
614+ { duration : 600 , easing : "ease-out" } ,
615615 ) ;
616616
617617 const onClickAll = useCallback ( async ( ) => {
@@ -677,15 +677,15 @@ const WavedRect = ({ i }: { i: number }) => {
677677 { transform : "translateY(0) scaleX(.8)" } ,
678678 { transform : "translateY(95vh) scaleX(1)" } ,
679679 ] ,
680- { ...baseTiming , duration : 2500 }
680+ { ...baseTiming , duration : 2500 } ,
681681 ) ;
682682 const opacity = useAnimation ( [ { opacity : 1 } , { opacity : 0 } ] , {
683683 ...baseTiming ,
684684 duration : 2000 ,
685685 } ) ;
686686 const color = useAnimation (
687687 [ { backgroundColor : "rgb(239, 239, 255)" } , { backgroundColor : "#e4c349" } ] ,
688- { ...baseTiming , duration : 3000 }
688+ { ...baseTiming , duration : 3000 } ,
689689 ) ;
690690
691691 useEffect ( ( ) => {
@@ -743,7 +743,7 @@ export const Countdown: StoryObj = {
743743 delay : 0 ,
744744 iterations : 1000 ,
745745 direction : "alternate" ,
746- }
746+ } ,
747747 ) ;
748748 const boomAnimation = useAnimation (
749749 [
@@ -771,7 +771,7 @@ export const Countdown: StoryObj = {
771771 easing : "ease-out" ,
772772 delay : 0 ,
773773 iterations : 1 ,
774- }
774+ } ,
775775 ) ;
776776
777777 useEffect ( ( ) => {
0 commit comments