UNPKG

@nature-ui/avatar

Version:

A base React component for icons

44 lines (41 loc) 1.61 kB
import * as _nature_ui_system_dist_system_types from '@nature-ui/system/dist/system.types'; import { PropsOf, nature } from '@nature-ui/system'; import React from 'react'; declare const baseStyle = "items-center inline-flex text-center justify-center uppercase font-medium relative flex-shrink-0 rounded-full"; interface AvatarOptions { name?: string; size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; showBorder?: boolean; children?: React.ReactNode; src?: string; srcSet?: string; color?: string; borderColor?: string; onError?(): void; icon?: React.ReactElement; getInitials?(name?: string): string; } declare const SIZES: { xs: string; sm: string; md: string; lg: string; xl: string; '2xl': string; }; type AvatarBadgeComp = PropsOf<typeof nature.div> & { size?: string; }; declare const AvatarBadge: { ({ size, className, ...rest }: AvatarBadgeComp): JSX.Element; displayName: string; }; type InitialsAvatarProps = PropsOf<typeof nature.div> & Pick<AvatarOptions, 'name' | 'getInitials'>; declare const InitialAvatar: (props: InitialsAvatarProps) => JSX.Element; declare const DefaultIcon: (props: PropsOf<'svg'>) => JSX.Element; declare const AvatarComp: _nature_ui_system_dist_system_types.NatureComponent<"span", { name?: string | undefined; }>; type AvatarProps = PropsOf<typeof AvatarComp> & AvatarOptions; declare const Avatar: _nature_ui_system_dist_system_types.ComponentWithAs<"span", AvatarProps>; export { Avatar, AvatarBadge, AvatarBadgeComp, AvatarProps, DefaultIcon, InitialAvatar, SIZES, baseStyle };