import { ReactNode } from "react"; import Checkbox from "../../form/input/Checkbox"; interface ListProps { children: ReactNode; variant?: "unordered" | "ordered" | "horizontal" | "button" | "icon" | "checkbox" | "radio"; className?: string; } export const List: React.FC = ({ children, variant = "unordered", className = "", }) => { const baseClasses = "rounded-lg border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] sm:w-fit"; if (variant === "ordered") { return (
    {children}
); } if (variant === "horizontal") { return ( ); } if (variant === "button") { return ( ); } return ( ); }; interface ListItemProps { children: ReactNode; variant?: "unordered" | "ordered" | "horizontal" | "button" | "icon" | "checkbox" | "radio"; onClick?: () => void; disabled?: boolean; className?: string; } export const ListItem: React.FC = ({ children, variant = "unordered", onClick, disabled = false, className = "", }) => { if (variant === "button") { return (
  • ); } if (variant === "horizontal") { return (
  • {children}
  • ); } return (
  • {children}
  • ); }; interface ListDotProps { className?: string; } export const ListDot: React.FC = ({ className = "" }) => { return ( ); }; interface ListIconProps { children: ReactNode; className?: string; } export const ListIcon: React.FC = ({ children, className = "", }) => { return ( {children} ); }; interface ListCheckboxItemProps { id: string; label: string; checked?: boolean; disabled?: boolean; onChange?: (checked: boolean) => void; className?: string; } export const ListCheckboxItem: React.FC = ({ id, label, checked = false, disabled = false, onChange, className = "", }) => { return (
  • onChange?.(val)} />
  • ); }; interface ListRadioItemProps { id: string; name: string; value: string; label: string; checked?: boolean; onChange?: (value: string) => void; className?: string; } export const ListRadioItem: React.FC = ({ id, name, value, label, checked = false, onChange, className = "", }) => { return (
  • ); };