mirror of
https://github.com/remvze/moodist.git
synced 2025-12-19 01:44:15 +00:00
style: add animation to presets
This commit is contained in:
parent
73a5c21be9
commit
787a9b60b5
1 changed files with 31 additions and 22 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
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';
|
||||||
|
|
||||||
|
|
@ -26,8 +27,15 @@ 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 => (
|
||||||
<div className={styles.preset} key={preset.id}>
|
<motion.div
|
||||||
|
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"
|
||||||
|
|
@ -47,8 +55,9 @@ export function List({ close }: ListProps) {
|
||||||
>
|
>
|
||||||
<FaPlay />
|
<FaPlay />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</motion.div>
|
||||||
))}
|
))}
|
||||||
|
</AnimatePresence>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue