style: change button animation

This commit is contained in:
MAZE 2023-10-31 12:41:27 +03:30
parent c44a86361e
commit 6983559032

View file

@ -15,7 +15,10 @@ export function UnselectButton() {
const hasHistory = useSoundStore(state => !!state.history); const hasHistory = useSoundStore(state => !!state.history);
const unselectAll = useSoundStore(state => state.unselectAll); const unselectAll = useSoundStore(state => state.unselectAll);
const variants = mix(fade(), slideX(10)); const variants = {
...mix(fade(), slideX(15)),
exit: { opacity: 0 },
};
return ( return (
<> <>
@ -23,7 +26,7 @@ export function UnselectButton() {
{(!noSelected || hasHistory) && ( {(!noSelected || hasHistory) && (
<motion.div <motion.div
animate="show" animate="show"
exit="hidden" exit="exit"
initial="hidden" initial="hidden"
variants={variants} variants={variants}
> >