import React, { isValidElement } from 'react'; import { Text, StyleSheet, TouchableOpacity, View } from 'react-native'; import { isBoolean, isFunction, isString } from 'lodash'; import styles from './styles/item.style'; import { Divider, ShouldRender } from '@xrnjs/ui'; import { VerticalListItemBase } from './interface'; const isValidString = (v: React.ReactNode) => isString(v) && v !== ''; const ListItemVertical: React.FC = (props) => { const { style, title, content, onPress, disabled, titleStyle, titleWrapperStyle, titleSuffix, contentStyle, extra, divider, } = props; const upArea = ( {title} {titleSuffix} {titleSuffix} {title} ); const downArea = ( <> {content} {content} ); const handlePress = () => { if (!isFunction(onPress)) { return; } onPress(); }; return ( {upArea} {downArea} {extra} {extra} {divider} ); }; export default ListItemVertical;