Toast.tsx (586B)
1 import classNames from '@/lib/classnames' 2 import { ReactNode } from 'react' 3 import { resolveValue, Toast as RealToast } from 'react-hot-toast' 4 import styles from './Toast.module.css' 5 6 export interface ToastProps { 7 toast: RealToast 8 } 9 10 export default function Toast ({ toast: t }: ToastProps) { 11 return ( 12 <div 13 {...classNames( 14 styles['toast'], 15 t.className, 16 t.visible ? styles['is-entering'] : styles['is-exiting'] 17 )} 18 style={{...t.style}} 19 > 20 <div {...t.ariaProps}> 21 {resolveValue(t.message, t)} 22 </div> 23 </div> 24 ) 25 }