import React, { PropsWithChildren } from 'react' import classNames from 'classnames' import * as ToastPrimitive from '@radix-ui/react-toast' import './index.scss' interface Props extends ToastPrimitive.ToastProps { altText: string className?: string title?: string content: React.ReactNode onCloseClick: () => void } const Toast = ({ altText, children, title, content, ...props }: PropsWithChildren) => { const { onCloseClick, ...toastProps } = props const classes = classNames(props.className, { Toast: true, }) return ( {title && (

{title}

×
)}

{content}

{children && ( {children} )}
) } export default Toast