import * as React from 'react' import { cx } from '../../utils/cx' export type ToastProps = React.HTMLProps & { children?: React.ReactNode onClick?: () => void className?: string } export const Toast = React.forwardRef( function Toast({ onClick, children, className, ...props }, ref) { return (
{ if (!(e.target as HTMLElement).closest('a')) { e.preventDefault() } return onClick?.() }} className={cx('nextjs-toast', className)} > {children}
) } )