UNPKG

987 BTypeScriptView Raw
1import { ViewStyle, StyleProp } from 'react-native';
2import { IconSource } from '../Icon';
3declare type Props = {
4 /**
5 * Icon to show.
6 */
7 icon: IconSource;
8 /**
9 * Color for the icon.
10 */
11 color?: string;
12 style?: StyleProp<ViewStyle>;
13};
14/**
15 * A component to show an icon in a list item.
16 *
17 * <div class="screenshots">
18 * <figure>
19 * <img class="medium" src="screenshots/list-icon.png" />
20 * </figure>
21 * </div>
22 *
23 * ## Usage
24 * ```js
25 * import * as React from 'react';
26 * import { List, Colors } from 'react-native-paper';
27 *
28 * const MyComponent = () => (
29 * <>
30 * <List.Icon color={Colors.blue500} icon="folder" />
31 * <List.Icon color={Colors.blue500} icon="equal" />
32 * <List.Icon color={Colors.blue500} icon="calendar" />
33 * </>
34 * );
35 *
36 * export default MyComponent;
37 * ```
38 */
39declare const ListIcon: {
40 ({ icon, color: iconColor, style }: Props): JSX.Element;
41 displayName: string;
42};
43export default ListIcon;