UNPKG

@oxyhq/services

Version:

Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀

62 lines • 1.53 kB
import React from 'react'; import { StyleProp, ViewStyle, ImageStyle, TextStyle } from 'react-native'; export interface AvatarProps { /** * URL of the avatar image */ uri?: string; /** * Text to display when no image is available * Defaults to first letter of name if name is provided */ text?: string; /** * Full name to derive the initials from (takes first letter) */ name?: string; /** * Size of the avatar in pixels * @default 40 */ size?: number; /** * Theme to use for colors * @default 'light' */ theme?: 'light' | 'dark'; /** * Background color for text avatar * Defaults to theme primary color */ backgroundColor?: string; /** * Text color for text avatar * @default '#FFFFFF' */ textColor?: string; /** * Additional styles for the container */ style?: StyleProp<ViewStyle>; /** * Additional styles for the image * Only used when uri is provided */ imageStyle?: StyleProp<ImageStyle>; /** * Additional styles for the text */ textStyle?: StyleProp<TextStyle>; /** * Is loading state * @default false */ isLoading?: boolean; } /** * Avatar component that displays either an image or text avatar * Falls back to displaying the first letter of the name if no image is provided */ declare const Avatar: React.FC<AvatarProps>; export default Avatar; //# sourceMappingURL=Avatar.d.ts.map