import React from 'react'; import { AvatarProps, TooltipProps } from 'antd'; import type { LiteralUnion } from 'antd/es/_util/type'; import AvatarBadge, { AvatarBadgeProps } from './AvatarBadge'; import { ToolTipColorTypes } from '../tooltip'; interface WhaleAvatarProps extends AvatarProps { withName?: boolean; closeIcon?: React.ReactNode; maxWidth?: number | string; toolTipBg?: LiteralUnion; toolTipProps?: TooltipProps; avatarBadgeProps?: AvatarBadgeProps; /** withName 时的 className */ wrapperClassName?: string; /** 是否背景透明 */ transparent?: boolean; /** `withName` 时只展示头像 */ simple?: boolean; /** 当没有协议时会添加 // * @example 设置 window.WHALE_AVATAR_URL_PROTOCAL = 'https://'|'http://' 会强制修改协议 */ src?: string; } declare global { interface Window { /** 设置时会强制添加协议 */ WHALE_AVATAR_URL_PROTOCAL?: 'https://' | 'http://'; } } /** * 小标签使用`size="small"` * @param props * @returns */ declare function Avatar(props: WhaleAvatarProps): JSX.Element; declare namespace Avatar { var Group: React.FC; } export default Avatar; export * from 'antd/es/avatar'; export { AvatarBadge };