import { Fragment } from 'react' import { Transition } from '@headlessui/react' import classNames from 'classnames' type Props = { isOpen: boolean message: string variant?: 'success' | 'error' topMost?: boolean } export const Alert = ({ isOpen, message, variant = 'error', topMost = false, }: Props) => { const classes = classNames( 'fixed z-20 top-5 left-1/2 transform -translate-x-1/2 max-w-sm w-full shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden', { 'bg-rose-500 text-white': variant === 'error', 'bg-blue-500 text-white': variant === 'success', } ) return (

{message}

) }