I'm trying to build an generic interface that will extend type T that also had a default of {}.
I'm getting an error saying that children, and className are not defined in CardCountentProps. However they should be exists as they are part of HTMLAttributes<HTMLDivElement>
export interface TailwindAttributesTypes<T = {}> extends T {
justify?: JustifyTypes,
items?: ItemsType;
}
export interface CardContentProps extends TailwindAttributesTypes<HTMLAttributes<HTMLDivElement>> {}
const CardContent = (props: CardContentProps) => {
const { children, className, justify = 'start', items = 'start', ...rest } = props;
return (
<h2
className={clsx(
'flex flex-col flex-1',
className
)}
{...rest}>
{children}
</h2>
);
};
export default CardContent;