UNPKG

@payfit/unity-components

Version:

86 lines (85 loc) 2.68 kB
import { VariantProps } from '@payfit/unity-themes'; import * as React from 'react'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; declare const avatarPlaceholder: import('tailwind-variants').TVReturnType<{ color: { blue: { background: string; foreground: string; }; yellow: { background: string; foreground: string; }; purple: { background: string; foreground: string; }; }; }, { base: string; background: string; foreground: string; }, undefined, { color: { blue: { background: string; foreground: string; }; yellow: { background: string; foreground: string; }; purple: { background: string; foreground: string; }; }; }, { base: string; background: string; foreground: string; }, import('tailwind-variants').TVReturnType<{ color: { blue: { background: string; foreground: string; }; yellow: { background: string; foreground: string; }; purple: { background: string; foreground: string; }; }; }, { base: string; background: string; foreground: string; }, undefined, unknown, unknown, undefined>>; type AvatarFallbackBaseProps = Pick<React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>, 'delayMs'>; type AvatarFallbackInitialsProps = AvatarFallbackBaseProps & { /** The fallback's variant. It can be one of: `initials`, `placeholder` */ variant: 'initials'; /** The initials to display as fallback content. Only available when variant is set to `initials` */ children: string | null | undefined; color?: never; }; type AvatarFallbackPlaceholderProps = AvatarFallbackBaseProps & { /** The variant of the fallback, should be 'placeholder' */ variant: 'placeholder'; /** * The color variant for the placeholder. Can be one of: `blue`, `purple`, `yellow`. Only available when variant is set to `placeholder` * @default 'blue' */ color?: VariantProps<typeof avatarPlaceholder>['color']; children?: never; }; type AvatarFallbackProps = AvatarFallbackInitialsProps | AvatarFallbackPlaceholderProps; /** * The AvatarFallback component displays a fallback content for an `Avatar` component when no image is provided or failed to load. */ declare const AvatarFallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>; export { AvatarFallback };