import React from 'react' import PropTypes from 'prop-types' import { Card, Flex, Text } from 'rebass' import MdClose from 'react-icons/lib/md/close' import SystemSuccess from 'components/Icon/SystemSuccess' import SystemWarning from 'components/Icon/SystemWarning' import SystemError from 'components/Icon/SystemError' import Spinner from './Spinner' /** * @render react * @name Notification * @example * Success message */ class Notification extends React.Component { static displayName = 'Notification' static defaultProps = { processing: false, variant: 'success' } static propTypes = { children: PropTypes.node, processing: PropTypes.bool, variant: PropTypes.string } render() { const { children, processing, variant } = this.props return ( {processing && } {!processing && variant === 'success' && } {!processing && variant === 'warning' && } {!processing && variant === 'error' && } {children} ) } } export default Notification