You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I extracted some code outside of a Modal base, to make the Modal reusable, however I'm getting one really odd error on a className prop...
I'm happy to send through further information, but for now here's a link to the code that causes the problem (unfortunately it's not a completely reproduced error though).
The error seems to show that className the intrinsic prop has a really weird type setting of className?: ((bag: TitleRenderPropArg) => string) | undefined; }. Here's the whole error.
Type 'string' is not assignable to type '(bag: TitleRenderPropArg) => string'.ts(2322)
types.d.ts(18, 5): The expected type comes from property 'className' which is declared here on
type 'IntrinsicAttributes & CleanProps<string, never> & OurProps<string, TitleRenderPropArg>
& { className?: ((bag: TitleRenderPropArg) => string) | undefined; } & { ...; }'
Any tips, suggestions and answers are welcome. Thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I extracted some code outside of a Modal base, to make the Modal reusable, however I'm getting one really odd error on a className prop...
I'm happy to send through further information, but for now here's a link to the code that causes the problem (unfortunately it's not a completely reproduced error though).
https://tsplay.dev/W4VOBN
The error seems to show that className the intrinsic prop has a really weird type setting of className?: ((bag: TitleRenderPropArg) => string) | undefined; }. Here's the whole error.
Any tips, suggestions and answers are welcome. Thanks
Beta Was this translation helpful? Give feedback.
All reactions