Avatar.d.ts 901 B

1234567891011121314151617181920212223242526
  1. import * as React from 'react';
  2. import type { AvatarSize } from './AvatarContext';
  3. export interface AvatarProps {
  4. /** Shape of avatar, options: `circle`, `square` */
  5. shape?: 'circle' | 'square';
  6. size?: AvatarSize;
  7. gap?: number;
  8. /** Src of image avatar */
  9. src?: React.ReactNode;
  10. /** Srcset of image avatar */
  11. srcSet?: string;
  12. draggable?: boolean | 'true' | 'false';
  13. /** Icon to be used in avatar */
  14. icon?: React.ReactNode;
  15. style?: React.CSSProperties;
  16. prefixCls?: string;
  17. className?: string;
  18. rootClassName?: string;
  19. children?: React.ReactNode;
  20. alt?: string;
  21. crossOrigin?: '' | 'anonymous' | 'use-credentials';
  22. onClick?: (e?: React.MouseEvent<HTMLElement>) => void;
  23. onError?: () => boolean;
  24. }
  25. declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
  26. export default Avatar;