mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 17:34:17 +00:00
style: remove animations
This commit is contained in:
parent
787a9b60b5
commit
28abc16b9c
3 changed files with 27 additions and 52 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import { FaPlay, FaRegTrashAlt } from 'react-icons/fa/index';
|
import { FaPlay, FaRegTrashAlt } from 'react-icons/fa/index';
|
||||||
import { motion, AnimatePresence } from 'framer-motion';
|
|
||||||
|
|
||||||
import styles from './list.module.css';
|
import styles from './list.module.css';
|
||||||
|
|
||||||
|
|
@ -27,15 +26,8 @@ export function List({ close }: ListProps) {
|
||||||
<p className={styles.empty}>You don't have any presets yet.</p>
|
<p className={styles.empty}>You don't have any presets yet.</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<AnimatePresence>
|
|
||||||
{presets.map(preset => (
|
{presets.map(preset => (
|
||||||
<motion.div
|
<div className={styles.preset} key={preset.id}>
|
||||||
animate={{ opacity: 1 }}
|
|
||||||
className={styles.preset}
|
|
||||||
exit={{ opacity: 0 }}
|
|
||||||
initial={{ opacity: 0 }}
|
|
||||||
key={preset.id}
|
|
||||||
>
|
|
||||||
<input
|
<input
|
||||||
placeholder="Untitled"
|
placeholder="Untitled"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -55,9 +47,8 @@ export function List({ close }: ListProps) {
|
||||||
>
|
>
|
||||||
<FaPlay />
|
<FaPlay />
|
||||||
</button>
|
</button>
|
||||||
</motion.div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</AnimatePresence>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import {
|
||||||
IoRefresh,
|
IoRefresh,
|
||||||
IoTrashOutline,
|
IoTrashOutline,
|
||||||
} from 'react-icons/io5/index';
|
} from 'react-icons/io5/index';
|
||||||
import { motion } from 'framer-motion';
|
|
||||||
|
|
||||||
import { ReverseTimer } from './reverse-timer';
|
import { ReverseTimer } from './reverse-timer';
|
||||||
|
|
||||||
|
|
@ -139,20 +138,8 @@ export function Timer({ id }: TimerProps) {
|
||||||
};
|
};
|
||||||
}, [isRunning, tick, id, spent, total, left]);
|
}, [isRunning, tick, id, spent, total, left]);
|
||||||
|
|
||||||
const variants = {
|
|
||||||
enter: { opacity: 1 },
|
|
||||||
exit: { opacity: 0 },
|
|
||||||
initial: { opacity: 0 },
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<div className={styles.timer}>
|
||||||
animate="enter"
|
|
||||||
className={styles.timer}
|
|
||||||
exit="exit"
|
|
||||||
initial="initial"
|
|
||||||
variants={variants}
|
|
||||||
>
|
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<div className={styles.bar}>
|
<div className={styles.bar}>
|
||||||
<div
|
<div
|
||||||
|
|
@ -211,6 +198,6 @@ export function Timer({ id }: TimerProps) {
|
||||||
<IoTrashOutline />
|
<IoTrashOutline />
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
</motion.div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { AnimatePresence } from 'framer-motion';
|
|
||||||
|
|
||||||
import { Timer } from './timer';
|
import { Timer } from './timer';
|
||||||
import { Notice } from './notice';
|
import { Notice } from './notice';
|
||||||
|
|
@ -31,11 +30,9 @@ export function Timers() {
|
||||||
)}
|
)}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<AnimatePresence>
|
|
||||||
{timers.map(timer => (
|
{timers.map(timer => (
|
||||||
<Timer id={timer.id} key={timer.id} />
|
<Timer id={timer.id} key={timer.id} />
|
||||||
))}
|
))}
|
||||||
</AnimatePresence>
|
|
||||||
|
|
||||||
<Notice />
|
<Notice />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue