UNPKG

@momentum-ui/react-collaboration

Version:

Cisco Momentum UI Framework for React Collaboration Applications

38 lines (37 loc) 1.23 kB
import { FC, ReactNode } from 'react'; import type { CloseButtonProps } from 'react-toastify'; import './NotificationTemplate.style.scss'; import { AriaLabelRequired } from '../../utils/a11y'; export type NotificationTemplateProps = AriaLabelRequired & { /** * The content to be shown in notification */ content: ReactNode; /** * Text of Close Button * * If undefined, the close button will not be shown */ closeButtonText?: string; /** * Callback `closeToast` passed into NotificationTemplate when used directly as content * * This will be fired if the user clicks on the X or Close button to tell react-toastify then * to close the notification automatically. * https://fkhadra.github.io/react-toastify/render-what-you-want */ closeToast?: CloseButtonProps['closeToast']; /** * Custom class for overriding this component's CSS. */ className?: string; /** * aria-label used for the toast close (x) button. */ toastCloseButtonLabel: string; }; /** * NOTE: this component is only used for the stories */ declare const NotificationTemplate: FC<NotificationTemplateProps>; export default NotificationTemplate;