UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

43 lines (42 loc) 1.35 kB
/** * @file index.tsx * * @fileoverview An alert component that focus on accessibility. */ import * as React from 'react'; export interface MessageAlertProps { /** * The contents on the alert message. */ children: React.ReactNode | string; /** * Accessibility information for the screen readers. * * @default "polite" */ type?: 'assertive' | 'polite'; /** * The alert visual type * * @default "success" */ alertStyle?: 'success' | 'warning' | 'danger'; /** * Event to call when closing the message. */ onClose?: () => void; } /** * The message alert is a component that can be rendered on the page and when rendered will warn the screen reader that something happened. It has different levels * of severity according to ARIA specifications. It should be used to prompt the user with information at real time. It uses aria live attributes to display this information * to screen readers acccordingly. Refer to [The aria documentation](https://www.w3.org/TR/wai-aria-practices-1.1/#alert) for more information * on accessible alerts. */ export declare const MessageAlert: { ({ children, onClose, ...props }: MessageAlertProps): JSX.Element; defaultProps: { alertStyle: string; type: string; }; }; export default MessageAlert;