Closed rtivital closed 5 months ago
i cant't use newer version becasue this bug...
@rtivital you know a workarround for this?
the solution for me
in 2.x i use
export interface Acao {
...
icone: (props: TablerIconsProps) => ReactElement;
...
}
now in 3.2.0
export interface Acao {
icone: React.ExoticComponent<React.RefAttributes<Icon>>;
}
and where i used Icon in props needs no changes.
export const menu: Acao[] = [
{
...
icone: IconDashboard,
...
},
....
The following code will have a TypeScript error:
Sandbox with a reproduction – https://codesandbox.io/p/sandbox/mantine-react-template-forked-jhy3jl?file=%2Fsrc%2FApp.tsx%3A3%2C1-7%2C2
The error is gone once
ref
prop is removed:To fix types mismatch change
IconProps
type fromto