react-native-modern-header-thecodingbeats
Version:
Fully customizable Modern Header View for React Native With The Coding Beats
36 lines (32 loc) • 645 B
text/typescript
import { ViewStyle, TextStyle, StyleSheet } from "react-native";
interface Style {
titleStyle: TextStyle;
leftCompStyle: ViewStyle;
rightCompStyle: ViewStyle;
}
export const _container = (
height: number | string,
width: number | string,
backgroundColor: string,
): ViewStyle => ({
width,
height,
top: 0,
backgroundColor,
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
});
export default StyleSheet.create<Style>({
leftCompStyle: {
left: 16,
position: "absolute",
},
rightCompStyle: {
right: 16,
position: "absolute",
},
titleStyle: {
fontWeight: "800",
},
});