import type { PickClassStyleType, ReactPropsBase, SchemaExpression } from 'jamis-core'; import type { PropsWithChildren } from 'react'; /** * Badge 角标。 * */ export interface BadgeObject extends ReactPropsBase { /** * 文本内容 */ text?: string | number; /** * 大小 */ size?: number; sizeExpr?: SchemaExpression; /** * 角标类型 */ mode?: 'text' | 'dot' | 'ribbon'; modeExpr?: SchemaExpression; /** * 角标位置,相对于position的位置进行偏移 */ offset?: [number | string, number | string]; /** * 角标位置 */ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; /** * 封顶的数字值 */ overflowCount?: number; /** * 动态控制是否显示 */ visibleOn?: string; /** * 是否显示动画 */ animation?: boolean; /** * 角标的自定义样式 */ style?: React.CSSProperties; /** * 提示类型 */ level?: 'info' | 'warning' | 'success' | 'danger' | string; } export interface BadgeProps extends PropsWithChildren, ReactPropsBase, PickClassStyleType { badge?: BadgeObject; data?: any; }