diff --git a/src/shared/ui/List/LinkItem.tsx b/src/shared/ui/List/LinkItem.tsx index b417f47..0ba2b25 100644 --- a/src/shared/ui/List/LinkItem.tsx +++ b/src/shared/ui/List/LinkItem.tsx @@ -3,48 +3,43 @@ import { cn } from "@/shared/lib"; import Button from "@mui/material/Button"; import { Link } from "@tanstack/react-router"; -interface LinkItemProps extends React.HTMLAttributes { +interface LinkItemProps { children?: React.ReactNode; - className?: string; to: string; isSelected?: boolean; } export default function LinkItem({ children, - className, to, isSelected = false, - ...props }: LinkItemProps) { return ( -
  • - - - -
  • + }, + }} + > + + {children} + + ); } diff --git a/src/shared/ui/List/Root.tsx b/src/shared/ui/List/Root.tsx index 89d025b..4909861 100644 --- a/src/shared/ui/List/Root.tsx +++ b/src/shared/ui/List/Root.tsx @@ -1,9 +1,28 @@ +import { Children } from "react"; import { cn } from "@/shared/lib"; +import { motion, AnimatePresence } from "framer-motion"; -interface RootProps extends React.HTMLAttributes { +interface RootProps { + children?: React.ReactNode; className?: string; } -export default function Root({ className, ...props }: RootProps) { - return
      ; +export default function Root({ children, className }: RootProps) { + return ( + + + {Children.map(children, (child, index) => ( + + {child} + + ))} + + + ); }