UNPKG

1.31 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, TextStyle, View, ViewStyle } from 'react-native';
3import type { ThemeProp } from '../../types';
4export type Props = React.ComponentPropsWithRef<typeof View> & {
5 /**
6 * Initials to show as the text in the `Avatar`.
7 */
8 label: string;
9 /**
10 * Size of the avatar.
11 */
12 size?: number;
13 /**
14 * Custom color for the text.
15 */
16 color?: string;
17 /**
18 * Style for text container
19 */
20 style?: StyleProp<ViewStyle>;
21 /**
22 * Style for the title.
23 */
24 labelStyle?: StyleProp<TextStyle>;
25 /**
26 * Specifies the largest possible scale a text font can reach.
27 */
28 maxFontSizeMultiplier?: number;
29 /**
30 * @optional
31 */
32 theme?: ThemeProp;
33};
34/**
35 * Avatars can be used to represent people in a graphical way.
36 *
37 * ## Usage
38 * ```js
39 * import * as React from 'react';
40 * import { Avatar } from 'react-native-paper';
41 *
42 * const MyComponent = () => (
43 * <Avatar.Text size={24} label="XD" />
44 * );
45 * ```
46 */
47declare const AvatarText: {
48 ({ label, size, style, labelStyle, color: customColor, theme: themeOverrides, maxFontSizeMultiplier, ...rest }: Props): React.JSX.Element;
49 displayName: string;
50};
51export default AvatarText;
52//# sourceMappingURL=AvatarText.d.ts.map
\No newline at end of file