import React, { FC } from 'react' import { useTheme } from '../hooks' import { NotificationType, FormNotification } from '../types' interface Props { notification: FormNotification } const Notification: FC = ({ notification }) => { const theme = useTheme() let color = theme.text switch (notification.type) { case NotificationType.Error: color = theme.red break case NotificationType.Success: color = theme.green } return (

{notification.message}

) } export default Notification