kristerkari / react-native-types-for-css-modules

React Native Typescript types with an extra added type: className property
MIT License
14 stars 11 forks source link

className gettting error on vs code #9

Open gihanrangana opened 1 year ago

gihanrangana commented 1 year ago

image image

how can i fix this?

namnm commented 1 year ago

I couldnt get it working too. Need to make a custom declaration .d.ts

import 'react-native'

declare module 'react-native' {
  type ClassName = string | string[]

  interface ViewProps {
    className?: ClassName
  }
  interface TextProps {
    className?: ClassName
  }
  // and others...
}