I don't understand how to create a good interface dynamic stylesheet
interface Styles { container: (backgroundColor: string) => StyleProp<ViewStyle>; image: (color: string) => StyleProp<ImageStyle>;}const styles = StyleSheet.create<Styles>({ container: (backgroundColor: string) => ({ width: "100%", height: "100%", backgroundColor, }), image: (color: string) => ({ width: 10, height: 10, tintColor: color, }),});
I got an error like this :
Type '(backgroundColor: string) => StyleProp<ViewStyle>' is not assignable to type 'ViewStyle | ImageStyle | TextStyle'