animation fix
This commit is contained in:
parent
c3cde782bb
commit
8139ba86ac
|
|
@ -9,10 +9,12 @@ interface RootProps {
|
||||||
|
|
||||||
export default function Root({ children, className }: RootProps) {
|
export default function Root({ children, className }: RootProps) {
|
||||||
return (
|
return (
|
||||||
<motion.ul className={cn("", className)}>
|
<motion.ul layout className={cn("", className)}>
|
||||||
<AnimatePresence initial={false}>
|
<AnimatePresence initial={false}>
|
||||||
{Children.map(children, (child, index) => (
|
{Children.map(children, (child, index) => (
|
||||||
<motion.li
|
<motion.li
|
||||||
|
layout
|
||||||
|
className="block"
|
||||||
key={index}
|
key={index}
|
||||||
initial={{ opacity: 0, height: 0 }}
|
initial={{ opacity: 0, height: 0 }}
|
||||||
animate={{ opacity: 1, height: "auto" }}
|
animate={{ opacity: 1, height: "auto" }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user