UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
refactor: create independent types definitions for the component's props (#157)
Ala Eddine Menai598a8416ff31
diff --git a/registry/components/magicui/animated-list.tsx b/registry/components/magicui/animated-list.tsxindex d9928c9a..4f045d80 100644--- a/registry/components/magicui/animated-list.tsx+++ b/registry/components/magicui/animated-list.tsx@@ -3,16 +3,14 @@import React, { ReactElement, useEffect, useMemo, useState } from "react";import { AnimatePresence, motion } from "framer-motion";+export interface AnimatedListProps {+ className?: string;+ children: React.ReactNode;+ delay?: number;+}+export const AnimatedList = React.memo(- ({- className,- children,- delay = 1000,- }: {- className?: string;- children: React.ReactNode;- delay?: number;- }) => {+ ({ className, children, delay = 1000 }: AnimatedListProps) => {const [index, setIndex] = useState(0);const childrenArray = React.Children.toArray(children);