interface IClassListProps { /** default classes to be applied to the array */ defaultClass?: string; /** classes to be applied to the array */ className?: string | string[]; /** variant classes to be applied to the array */ variant?: string | string[]; /** maps classes to be applied to the array */ maps?: { [key: string]: string; }; /** determines if the output is a string or an array */ string?: T; } /** * A simple hook to generate a class list, based on the default classes, the className and the variant classes. * * @param object containing the default classes, the className and the variant classes (all are optional and can be an array or a string) * * @example * const classList = useClassList( * { defaultClass: "choice-box", string: true }, * useCallback((_c) => active && _c.push("choice-box--is-active"), [active]) * ); * * @returns set of class names in array or string format */ export default function useClassList({ defaultClass, className, variant, maps, string }: IClassListProps, callback?: (list: string[]) => void): T extends true ? string : string[]; export {};