import * as React from "react"; import { StyleProp, TextStyle, ViewStyle } from "react-native"; import TouchableRipple from "../TouchableRipple/TouchableRipple"; import { $RemoveChildren, EllipsizeProp } from "../types"; import { DefaultTheme } from "styled-components"; declare type Description = React.ReactNode | ((props: { selectable: boolean; ellipsizeMode: EllipsizeProp | undefined; color: string; fontSize: number; }) => React.ReactNode); declare type Props = $RemoveChildren & { /** * Title text for the list item. */ title?: React.ReactNode; /** * Description text for the list item or callback which returns a React element to display the description. */ description?: Description | null; /** * Callback which returns a React element to display on the left side. */ left?: (props: { color: string; style: { marginLeft: number; marginRight: number; marginVertical?: number; }; }) => React.ReactNode; /** * Callback which returns a React element to display on the right side. */ right?: (props: { color: string; style?: { marginRight: number; marginVertical?: number; }; }) => React.ReactNode; /** * Callback which returns a React element to display on the right side. */ content?: (props: { color: string; style?: { marginRight?: number; marginVertical?: number; }; }) => React.ReactNode; /** * Function to execute on press. */ onPress?: () => void; /** * @optional */ theme?: DefaultTheme; /** * Style that is passed to the wrapping TouchableRipple element. */ style?: StyleProp; focusedStyle?: StyleProp; hoveredStyle?: StyleProp; pressedStyle?: StyleProp; /** * Style that is passed to wrap content. */ rowStyle?: StyleProp; /** * Style that is passed to wrap content. */ contentStyle?: StyleProp; /** * Style that is passed to Title element. */ titleStyle?: StyleProp; /** * Style that is passed to Description element. */ descriptionStyle?: StyleProp; /** * Truncate Title text such that the total number of lines does not * exceed this number. */ titleNumberOfLines?: number; /** * Truncate Description text such that the total number of lines does not * exceed this number. */ descriptionNumberOfLines?: number; /** * Ellipsize Mode for the Title. One of `'head'`, `'middle'`, `'tail'`, `'clip'`. * * See [`ellipsizeMode`](https://reactnative.dev/docs/text#ellipsizemode) */ titleEllipsizeMode?: EllipsizeProp; /** * Ellipsize Mode for the Description. One of `'head'`, `'middle'`, `'tail'`, `'clip'`. * * See [`ellipsizeMode`](https://reactnative.dev/docs/text#ellipsizemode) */ descriptionEllipsizeMode?: EllipsizeProp; }; /** * A component to show tiles inside a List. * *
* * * *
* * ## Usage * ```js * import * as React from 'react'; * import { ListItem } from 'react-native-simple-elements/components/ListItem'; * * const MyComponent = () => ( * } * /> * ); * * export default MyComponent; * ``` * */ declare const FlexItem: { ({ left, right, content, title, description, onPress, style, focusedStyle, hoveredStyle, pressedStyle, rowStyle, contentStyle, titleStyle, titleNumberOfLines, descriptionNumberOfLines, titleEllipsizeMode, descriptionEllipsizeMode, descriptionStyle, ...rest }: Props): JSX.Element; displayName: string; }; export default FlexItem;