When I pass the parameter:
defaultButtonTextDark: { fontWeight: 'bold', color: 'white', fontSize: 16, },
into ThemeManager
function :
const ThemeManager = (darkStyle: ViewStyle, lightStyle: ViewStyle) => { DO SOMETHING...}
So it shows me the following error:
Type '{ fontWeight: "bold"; color: string; fontSize: number; }' has no properties in common with type 'ViewStyle'.ts(2559).
way of use the function:
<Text style={ThemeManager(styles.defaultButtonTextDark, styles.defaultButtonText)}>return default</Text>
What is the way to solve this type issue ?