/** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ import React from 'react'; import { ImageProps, ViewProps } from 'react-native'; import { RenderProp, TouchableWebElement, TouchableWebProps, Overwrite, LiteralUnion } from '../../devsupport'; import { StyledComponentProps } from '../../theme'; import { TextProps } from '../text/text.component'; type ListItemStyledProps = Overwrite; }>; export interface ListItemProps extends TouchableWebProps, ListItemStyledProps { title?: RenderProp | React.ReactText; description?: RenderProp | React.ReactText; accessoryLeft?: RenderProp>; accessoryRight?: RenderProp; children?: React.ReactNode; } export type ListItemElement = React.ReactElement; /** * A single item rendered in List. * Items should be rendered within List by providing them through `renderItem` property to provide a usable component. * * @extends React.Component * * @property {ReactElement | ReactText | (TextProps) => ReactElement} title - String, number or a function component * to render within the item. * If it is a function, expected to return a Text. * * @property {ReactElement | ReactText | (TextProps) => ReactElement} description - String, number or a function * component to render within the item. * If it is a function, expected to return a Text. * * @property {ReactElement | (ImageProps) => ReactElement} accessoryLeft - Function component * to render to start of the text. * Expected to return an Image. * * @property {ReactElement | (ViewProps) => ReactElement} accessoryRight - Function component * to render to end of the text. * * @property {ReactNode} children - Component to render within the item. * Useful when needed to render a custom item and get a feedback when it is pressed. * If provided, *title* and other properties will be ignored. * * @property {TouchableOpacityProps} ...TouchableOpacityProps - Any props applied to TouchableOpacity component. * * @overview-example ListItemSimpleUsage * * @overview-example ListItemStyling * List Item and it's inner views can be styled by passing them as function components. * * In most cases this is redundant, if [custom theme is configured](guides/branding). * ``` * import { ListItem, Text } from '@wirthus/ui-kitten-components'; * * TITLE} * description={evaProps => DESCRIPTION} * /> * ``` */ export declare class ListItem extends React.Component { private onPressIn; private onPressOut; private getComponentStyle; private renderTemplateChildren; render(): TouchableWebElement; } export {};