import { Toast, toaster } from "@kobalte/core"; import { Portal } from "solid-js/web"; import close from "~/assets/icons/close.svg"; import { SmallHeader } from "./layout"; export function Toaster() { return ( ) } type ToastArg = { title: string, description: string } | Error export function showToast(arg: ToastArg) { if (arg instanceof Error) { return toaster.show(props => ( )) } else { return toaster.show(props => ( )) } } export function ToastItem(props: { toastId: number, title: string, description: string, isError?: boolean }) { return (
{props.title}

{props.description}

Close
{/* */}
) }