@spark-web/badge
Version:
--- title: Badge isExperimentalPackage: true ---
37 lines (36 loc) • 1.26 kB
TypeScript
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): import("@emotion/react/jsx-runtime").JSX.Element;
export 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): import("@emotion/react/jsx-runtime").JSX.Element;
export 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. */
type BadgeTones = 'accent' | 'caution' | 'critical' | 'info' | 'neutral' | 'positive';
export {};