import { StylableComponentProps } from '../theme' import { NotificationState } from './reducers' /** * Each level has an associatied key and icon */ export interface NotificationLevel { key: string icon: string } /** * Model of a notification */ export interface NotificationModel { id: string autoclose: number // milliseconds to wait or -1 message: string level: NotificationLevel } /** * The container component that displays one or more notifications */ export interface NotificationRootProps extends StylableComponentProps { // show all notifications or just one? // defaults to true showAll?: boolean max?: number } export interface NotificationRootComponentProps extends NotificationRootProps { // queued notifications notifications: NotificationModel[] } /** * A single notification component */ export interface NotificationProps extends StylableComponentProps { notification: NotificationModel } export interface NotificationComponentProps extends NotificationProps { hideNotification: (id: string) => any }