-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
It works as expected with preact version 10.19.3. The issues are reproducable with 10.19.4 - 10.19.6.
Issue 1
<Card component="form" />cause:
No overload matches this call.
Overload 1 of 2, '(props: never): Element | null', gave the following error.
Type 'string' is not assignable to type 'never'.
Overload 2 of 2, '(props: DefaultComponentProps<CardTypeMap<{}, "div">>): Element | null', gave the following error.
Type '{ component: string; }' is not assignable to type 'IntrinsicAttributes & CardOwnProps & CommonProps & Omit<HTMLAttributes<HTMLDivElement>, "children" | ... 7 more ... | "raised">'.
Property 'component' does not exist on type 'IntrinsicAttributes & CardOwnProps & CommonProps & Omit<HTMLAttributes<HTMLDivElement>, "children" | ... 7 more ... | "raised">'.ts(2769)
Issue 2
another issue is related to Button:
<Button>
test
<Icon />
</Button>cause:
No overload matches this call.
Overload 2 of 3, '(props: { component: React.ElementType; } & ButtonOwnProps & Omit<ButtonBaseOwnProps, "classes"> & CommonProps & Omit<any, "className" | "style" | ... 23 more ... | "startIcon">): Element | null', gave the following error.
Type 'Element' is not assignable to type 'string'.ts(2769)
Issue 3
and another one:
<Button>
test
{disabled && <Icon />}
</Button>cause:
No overload matches this call.
Overload 2 of 3, '(props: { component: React.ElementType; } & ButtonOwnProps & Omit<ButtonBaseOwnProps, "classes"> & CommonProps & Omit<any, "className" | "style" | ... 23 more ... | "startIcon">): Element | null', gave the following error.
Type 'false | Element | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.ts(2769)
howlettt