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 { className?: string title?: string content: string onCloseClick: () => void } const Toast = ({ children, title, content, ...props }: PropsWithChildren) => { const classes = classNames(props.className, { Toast: true, }) return (
{title && (

{title}

)} ×

{content}

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