UNPKG

@chief-editor/ui

Version:

UI Component for chief editor

16 lines (15 loc) 721 B
import { CSSProperties, HTMLAttributes, MouseEventHandler, ReactNode } from 'react'; import { UnionOmit } from '@co-hooks/util'; import { IOffset } from '@co-hooks/dom'; export declare type PlacementType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; export declare type BadgeType = 'info' | 'primary' | 'danger' | 'warning' | 'success' | string; export interface IBadge { type?: BadgeType; placement?: PlacementType; content?: ReactNode; offset?: IOffset; badgeStyle?: CSSProperties; onBadgeClick?: MouseEventHandler<HTMLElement>; } export declare type IBadgeProps = UnionOmit<IBadge, HTMLAttributes<HTMLDivElement>>; export declare function Badge(props: IBadgeProps): JSX.Element;