UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

25 lines (24 loc) 860 B
import { ReactNode } from 'react'; import { AvatarRootProps } from './primitives'; /** * This module provides an abstraction of the Avatar primitives. * @module 'avatar' */ export type AvatarWithoutImage = { alt?: never; src?: never; fallback: ReactNode; }; export type AvatarWithImage = { alt: string; src: string; fallback?: ReactNode; }; export type AvatarProps = AvatarRootProps & (AvatarWithoutImage | AvatarWithImage); /** * Avatar component is an abstraction of the primitives that displays a * avatar or it's fallback when the image fails to load. * @description [Cerberus Docs](https://cerberus.digitalu.design/react/avatar/overview) * @description [Ark Docs](https://ark-ui.com/react/docs/components/avatar#api-reference) */ export declare function Avatar(props: AvatarProps): import("react/jsx-runtime").JSX.Element;