@itwin/itwinui-react
Version:
A react component library for iTwinUI
27 lines (26 loc) • 939 B
TypeScript
import { SoftBackgrounds } from '../../utils/index.js';
import type { AnyString, PolymorphicForwardRefComponent } from '../../utils/index.js';
type BadgeProps = {
/**
* Background color of the badge.
*
* Recommended to use one of the preset colors for statuses and soft backgrounds.
*
* If not specified, a default neutral background will be used.
*/
backgroundColor?: 'primary' | 'informational' | 'positive' | 'negative' | 'warning' | keyof typeof SoftBackgrounds | AnyString;
/**
* Badge label.
* Always gets converted to uppercase, and truncated if too long.
*/
children: string;
};
/**
* A colorful visual indicator for categorizing items.
* @example
* <Badge>Label</Badge>
* <Badge backgroundColor="sunglow">Label</Badge>
* <Badge backgroundColor="positive">Label</Badge>
*/
export declare const Badge: PolymorphicForwardRefComponent<"span", BadgeProps>;
export {};