UNPKG

@cavilha/badge

Version:

A badge component used to highlight data features such as status, types, a numeric feature, or tagging an item.

19 lines (18 loc) 694 B
import React from 'react'; import * as S from './Badge.styles'; export declare type BadgeProps = { /** Number to show in badge */ count?: number | string; /** Whether to show badge when count is zero */ showZero?: boolean; /** Max count to show */ overflowCount?: number; /** Whether to show red dot without number */ dot?: boolean; /** Text to show in badge */ text?: string; /** React Node children to show in badge */ children?: React.ReactNode; } & Omit<S.Variants, 'type'>; declare const Badge: ({ count, showZero, overflowCount, dot, text, children, color, align, css, }: BadgeProps) => JSX.Element; export default Badge;