Open lcnxx opened 4 years ago
The react-css-modules is desperated now and it doesn't work for me.
This works for me.
// global.d.ts
import 'react';
declare module 'react' {
interface Attributes {
styleName?: string;
}
}
@EmiyaYang your solution doesn't work with
typescript 4.3.5
and react 17.0.2
Got Property 'styleName' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'
Maybe you have some thoughts how to fix that
Just add the types for react-css-modules:
Check the package here