import classNames from 'classnames' import { useMemo } from 'react' import { CheckCircled, CrossCircled, ExclamationMarkTriangle } from 'components/Icons' import Text from 'components/Text' interface Props { type: 'success' | 'error' | 'warning' | 'info' text: string button: React.ReactNode } export default function NotificationBanner(props: Props) { const [glasColor, bgColor, icon] = useMemo(() => { if (props.type === 'success') return [ 'bg-success-bg/20', 'bg-success', , ] if (props.type === 'error') return [ 'bg-error-bg/20', 'bg-error', , ] if (props.type === 'warning') return [ 'bg-warning-bg/20', 'bg-warning', , ] return [ 'bg-info-bg/20', 'bg-info', , ] }, [props.type]) return (
{icon}
{props.text} {props.button}
) }