import * as React from "react"; import { View, Text, Image, ImageSourcePropType, StyleSheet, StyleProp, TextStyle, ViewStyle, } from "react-native"; import { withTheme } from "../core/theming"; import Config from "./Config"; import theme from "../styles/DefaultTheme"; type Props = { titleTypeStyle?: StyleProp; titleColor?: string; subtitleTypeStyle?: StyleProp; subtitleColor?: string; title?: string; subtitle?: string; multilineSubtitle?: boolean; image?: string | ImageSourcePropType; right?: () => React.ReactNode; style?: StyleProp; theme: typeof theme; }; const Row: React.FC = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => { return ( {image && ( )} {title} {subtitle ? ( {subtitle} ) : null} {right && right()} ); }; const styles = StyleSheet.create({ leftContainer: { flexDirection: "row", flex: 1, }, container: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", }, textContainer: { flex: 1, justifyContent: "center", }, }); export default withTheme(Row);