UNPKG

@grafana/ui

Version:
23 lines (22 loc) 1.02 kB
import { type HTMLAttributes, type ReactNode } from 'react'; import * as React from 'react'; export type AlertVariant = 'success' | 'warning' | 'error' | 'info'; export interface Props extends HTMLAttributes<HTMLDivElement> { title: string; /** On click handler for alert button, mostly used for dismissing the alert */ onRemove?: (event: React.MouseEvent) => void; severity?: AlertVariant; children?: ReactNode; elevated?: boolean; buttonContent?: React.ReactNode | string; bottomSpacing?: number; topSpacing?: number; /** Custom action element rendered in the alert's button area, independently from the dismiss button. */ action?: ReactNode; } /** * An alert displays an important message in a way that attracts the user's attention without interrupting the user's task. * * https://developers.grafana.com/ui/latest/index.html?path=/docs/information-alert--docs */ export declare const Alert: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;