Open akshetpandey opened 2 months ago
I found the same, and as a work around I defined this type:
export type IconSVGProps = React.PropsWithoutRef<React.SVGProps<SVGSVGElement>> & React.RefAttributes<SVGSVGElement>;
export type FlowbiteIconProps = IconSVGProps & {
title?: string;
titleId?: string;
};
export type FlowbiteIcon = FC<Omit<SVGProps<SVGSVGElement>, "ref">> & FlowbiteIconProps;
then you can do something like this in the flowbite components with the issue:
icon={FilmIcon as FlowbiteIcon}
Steps to reproduce
Sample form https://flowbite-react.com/docs/components/alert#alert-with-icon
This will produce a TS error:
HiInformationCircle:IconType is not assignable to icon:FC<SVGProps<SVGSVGElement>>