@grafana/ui
Version:
Grafana Components Library
20 lines (19 loc) • 882 B
TypeScript
import { type HTMLAttributes } from 'react';
import * as React from 'react';
import { type IconName } from '../../types/icon';
import { type PopoverContent } from '../Tooltip/types';
export type BadgeColor = 'blue' | 'red' | 'green' | 'orange' | 'purple' | 'darkgrey' | 'brand';
export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
text?: React.ReactNode;
color: BadgeColor;
icon?: IconName;
tooltip?: PopoverContent;
}
/**
* The badge component adds meta information to other content, for example about release status or new elements. You can add any `Icon` component or use the badge without an icon.
*
* https://developers.grafana.com/ui/latest/index.html?path=/docs/information-badge--docs
*/
export declare const Badge: React.NamedExoticComponent<BadgeProps> & {
Skeleton: (props: unknown) => import("react/jsx-runtime").JSX.Element;
};