diff --git a/packages/grafana-ui/src/components/Alert/Alert.tsx b/packages/grafana-ui/src/components/Alert/Alert.tsx index b009b01d5fc..451197091d9 100644 --- a/packages/grafana-ui/src/components/Alert/Alert.tsx +++ b/packages/grafana-ui/src/components/Alert/Alert.tsx @@ -9,7 +9,7 @@ import { getColorsFromSeverity } from '../../utils/colors'; export type AlertVariant = 'success' | 'warning' | 'error' | 'info'; -export interface Props extends HTMLAttributes { +export interface Props extends HTMLAttributes { title: string; /** On click handler for alert button, mostly used for dismissing the alert */ onRemove?: (event: React.MouseEvent) => void; @@ -39,13 +39,13 @@ function getIconFromSeverity(severity: AlertVariant): string { } } -export const Alert: FC = React.forwardRef( - ({ title, buttonText, onButtonClick, onRemove, children, buttonContent, severity = 'error', ...restProps }) => { +export const Alert: FC = React.forwardRef( + ({ title, buttonText, onButtonClick, onRemove, children, buttonContent, severity = 'error', ...restProps }, ref) => { const theme = useTheme(); const styles = getStyles(theme, severity, !!buttonContent); return ( -
+