@spark-web/badge
Version:
--- title: Badge isExperimentalPackage: true ---
38 lines (37 loc) • 1.24 kB
TypeScript
/// <reference types="react" />
import type { DataAttributeMap } from '@spark-web/utils/internal';
/**
* Badge
*
* A decorative indicator used to either call attention to an item or for
* communicating non-actionable, supplemental information.
*/
export declare function Badge({ children, data, tone }: BadgeProps): JSX.Element;
export declare type BadgeProps = {
/** The label of the badge. */
children: string | number;
/** Sets data attributes on the component. */
data?: DataAttributeMap;
/** The tone of the badge. */
tone?: BadgeTones;
};
/**
* IndicatorDot
*
* A small decorative indicator used to call attention to an item.
*/
export declare function IndicatorDot({ data, label, tone }: IndicatorDotProps): JSX.Element;
export declare type IndicatorDotProps = {
/** Sets data attributes on the component. */
data?: DataAttributeMap;
/** When the intent isn't provided by text, you must supply an "aria-label" for assistive tech users. */
label?: string;
/** The tone of the indicator dot. */
tone: BadgeTones;
};
/**
* Shared Types
*/
/** The tone of the badge. */
declare type BadgeTones = 'accent' | 'caution' | 'critical' | 'info' | 'neutral' | 'positive';
export {};