xxxxxxxxxx
import { StyleSheet, TextStyle, ViewStyle } from "react-native";
type Style = {
container: ViewStyle;
title: TextStyle;
icon: ImageStyle;
};
export default StyleSheet.create<Style>({
container: {
flex: 1
},
title: {
color: red
},
icon: {
width: 10,
height: 10
}
});
xxxxxxxxxx
export default StyleSheet.create<Styles | any>({
button: (height: number, width: string, color: string) => ({
height: height,
width: width,
backgroundColor: color,
alignItems: 'center',
justifyContent: 'center',
borderRadius: 10,
}),
});