UNPKG

1.02 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, View, ViewStyle } from 'react-native';
3import type { ThemeProp } from '../../types';
4import { IconSource } from '../Icon';
5export type Props = React.ComponentPropsWithRef<typeof View> & {
6 /**
7 * Icon to display for the `Avatar`.
8 */
9 icon: IconSource;
10 /**
11 * Size of the avatar.
12 */
13 size?: number;
14 /**
15 * Custom color for the icon.
16 */
17 color?: string;
18 style?: StyleProp<ViewStyle>;
19 /**
20 * @optional
21 */
22 theme?: ThemeProp;
23};
24/**
25 * Avatars can be used to represent people in a graphical way.
26 *
27 * ## Usage
28 * ```js
29 * import * as React from 'react';
30 * import { Avatar } from 'react-native-paper';
31 *
32 * const MyComponent = () => (
33 * <Avatar.Icon size={24} icon="folder" />
34 * );
35 * ```
36 */
37declare const Avatar: {
38 ({ icon, size, style, theme: themeOverrides, ...rest }: Props): React.JSX.Element;
39 displayName: string;
40};
41export default Avatar;
42//# sourceMappingURL=AvatarIcon.d.ts.map
\No newline at end of file