Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Using NativeWind With React Native Paper

$
0
0

I use native wind and react native paper and I use typescript in my expo project.The problem is how can I add "className" and "tw" attribute to my paper views.

I've already added it on my views using this declare:

import "react-native";declare module "react-native" {  interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {    className?: string;    tw?: string;  }  interface ImagePropsBase {    className?: string;    tw?: string;  }  interface ViewProps {    className?: string;    tw?: string;  }  interface TextProps {    className?: string;    tw?: string;  }  interface SwitchProps {    className?: string;    tw?: string;  }  interface InputAccessoryViewProps {    className?: string;    tw?: string;  }  interface TouchableWithoutFeedbackProps {    className?: string;    tw?: string;  }}

and my views have "className" and "tw" as well but this does not work:

import "react-native-paper"declare module "react-native-paper" {    interface FAB {        className? : string;        tw?: string;    }}

and my FAB view still does not have "className" or "tw"

How can I fix this?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>