import React from 'react'; import PropTypes from 'prop-types'; import { ComponentProps } from '../utils/types'; interface MessageBarPropsBase { /** * Text is required and should be concise. */ children: React.ReactNode; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * Includes a close button. Always consider including a close button. */ onRequestClose?: React.MouseEventHandler; /** * Sets the severity of this `MessageBar`. * */ type: 'info' | 'warning' | 'error' | 'success'; } type MessageBarProps = ComponentProps; declare function MessageBar({ children, elementRef, onRequestClose, type, ...otherProps }: MessageBarProps): React.JSX.Element; declare namespace MessageBar { var propTypes: { children: PropTypes.Validator>; onRequestClose: PropTypes.Requireable<(...args: any[]) => any>; type: PropTypes.Validator; }; } export default MessageBar; export type { MessageBarPropsBase };