File tree Expand file tree Collapse file tree 1 file changed +33
-3
lines changed
apps/webapp/app/components/runs/v3 Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change 11import { useCallback , useState , type KeyboardEvent } from "react" ;
2+ import { AnimatePresence , motion } from "framer-motion" ;
23import { Input } from "~/components/primitives/Input" ;
34import { RunTag } from "./RunTag" ;
45
@@ -71,9 +72,38 @@ export function RunTagInput({
7172
7273 { tags . length > 0 && (
7374 < div className = "mt-1 flex flex-wrap items-center gap-1 text-xs" >
74- { tags . map ( ( tag , i ) => (
75- < RunTag key = { tag } tag = { tag } action = { { type : "delete" , onDelete : removeTag } } />
76- ) ) }
75+ < AnimatePresence mode = "popLayout" >
76+ { tags . map ( ( tag , i ) => (
77+ < motion . div
78+ key = { tag }
79+ initial = { {
80+ opacity : 0 ,
81+ scale : 0.8 ,
82+ } }
83+ animate = { {
84+ opacity : 1 ,
85+ scale : 1 ,
86+ } }
87+ exit = { {
88+ opacity : 0 ,
89+ scale : 0.7 ,
90+ y : - 10 ,
91+ transition : {
92+ duration : 0.15 ,
93+ ease : "easeOut" ,
94+ } ,
95+ } }
96+ transition = { {
97+ type : "spring" ,
98+ stiffness : 400 ,
99+ damping : 25 ,
100+ duration : 0.15 ,
101+ } }
102+ >
103+ < RunTag tag = { tag } action = { { type : "delete" , onDelete : removeTag } } />
104+ </ motion . div >
105+ ) ) }
106+ </ AnimatePresence >
77107 </ div >
78108 ) }
79109 </ div >
You can’t perform that action at this time.
0 commit comments