UNPKG

retro-react

Version:

A React component library for building retro-style websites

38 lines (37 loc) 1.14 kB
/// <reference types="react" /> import { ThemeUICSSObject } from 'theme-ui'; import { ComponentColors } from "../../utils/getColorScheme"; export declare type BadgeSize = 'small' | 'medium' | 'large'; export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> { /** * The color of the Badge. * * @default 'primary' */ color?: ComponentColors | 'highlight'; /** * Whether the badge should pulsate to draw attention. * * @default false */ pulse?: boolean; /** * Badge contents, typically a number or string. If `null`, `0`, or `undefined`, the badge will be hidden. */ badgeContent?: number | string; children?: React.ReactNode; /** * The size of the Badge. * * @default 'medium' */ size?: BadgeSize; /** * Whether to show the badge when the count is zero. * * @default false */ showZero?: boolean; sx?: ThemeUICSSObject; } export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;