import * as React from "react"; import { View, Text, StyleSheet, StyleProp, TextStyle, ViewStyle, } from "react-native"; import { withTheme } from "../core/theming"; import Divider from "./Divider"; import Icon from "./Icon"; import Touchable from "./Touchable"; import Config from "./Config"; import theme from "../styles/DefaultTheme"; type Props = { titleTypeStyle?: StyleProp; titleColor: string; title: string; buttonText: string; dividerTopMargin?: number; icon: string; onPress: () => void; style?: StyleProp; theme: typeof theme; }; const Header: React.FC = ({ titleTypeStyle, titleColor, title, buttonText, dividerTopMargin, icon, onPress, style, theme: { colors, typography }, }) => { return ( {title} {onPress && ( {buttonText} )} ); }; const styles = StyleSheet.create({ container: { alignSelf: "stretch", }, topContainer: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", }, buttonContainer: { flexDirection: "row", justifyContent: "center", alignItems: "center", }, }); export default withTheme(Header);