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

does native-base have a utility method that allows us to extract computed theme data?

$
0
0

I am using native base and I want to use some of the theme values for example the primary text color and the main background color

I am looking for something that can take in a theme object as a parameter so I don't need to be in the context yet. So I can't use useTheme()

something along the lines of

computeStyle('Text', { colorScheme: 'primary` }, theme);

The second parameter being props that are applied to Text that may alter the result

The result should have a type of TextStyle | ViewStyle

The tricky bit I found so far is I don't have the theme context as of yet.


Viewing all articles
Browse latest Browse all 6287

Trending Articles