import React from 'react'; import classNames from 'classnames'; import { SessionIcon, SessionIconButton, SessionIconSize, SessionIconType, } from './icon/'; export enum SessionToastType { Info = 'info', Success = 'success', Warning = 'warning', Error = 'error', } interface Props { title: string; description: string; type: SessionToastType; } export class SessionToast extends React.PureComponent { public static defaultProps = { description: '', type: SessionToastType.Info, }; constructor(props: any) { super(props); } public render() { const { title, description, type } = this.props; let toastIcon; switch (type) { case SessionToastType.Info: toastIcon = SessionIconType.Eye; break; case SessionToastType.Success: toastIcon = SessionIconType.Check; break; case SessionToastType.Error: toastIcon = SessionIconType.Search; break; case SessionToastType.Warning: toastIcon = SessionIconType.Globe; break; default: toastIcon = SessionIconType.Globe; } return (

{title}

{description}

); } public closeToast() { return; } }