UNPKG

reablocks

Version:
39 lines (37 loc) 1.02 kB
import { BadgeTheme } from './BadgeTheme'; import { default as React, FC, LegacyRef } from 'react'; export type BadgeColor = 'default' | 'primary' | 'secondary' | 'error'; export type BadgePlacement = 'top-start' | 'top-end' | 'bottom-end' | 'bottom-start'; export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'content'> { /** * The content of the badge. */ content?: string | React.JSX.Element; /** * The color of the badge. */ color?: BadgeColor | string; /** * Whether to disable the margins. */ disableMargins?: boolean; /** * Whether the badge is hidden or not. */ hidden?: boolean; /** * The placement of the badge. */ placement?: BadgePlacement; /** * Theme for the Budge. */ theme?: BadgeTheme; } export interface BadgeRef { /** * Reference to the HTML span element. */ ref?: LegacyRef<HTMLSpanElement>; } export declare const Badge: FC<BadgeProps & BadgeRef>;