"use client"; /* * Documentation: * Progress — https://app.subframe.com/f023064a5ca0/library?component=Progress_60964db0-a1bf-428b-b9d5-f34cdf58ea77 * Toast — https://app.subframe.com/f023064a5ca0/library?component=Toast_2c7966c2-a95d-468a-83fe-bf196b95be7a */ import React from "react"; import { FeatherAlertCircle } from "@subframe/core"; import { FeatherAlertTriangle } from "@subframe/core"; import { FeatherCheckCircle } from "@subframe/core"; import { FeatherInbox } from "@subframe/core"; import { FeatherInfo } from "@subframe/core"; import { FeatherX } from "@subframe/core"; import * as SubframeUtils from "../../utils"; import { Progress } from "../Progress"; export interface ToastRootProps extends Omit, "title"> { variant?: "information" | "success" | "warning" | "error" | "neutral"; dismissible?: boolean; hideProgress?: boolean; hideUndo?: boolean; title?: React.ReactNode; description?: React.ReactNode; progress?: number; undoLabel?: React.ReactNode; className?: string; } const ToastRoot = React.forwardRef( function ToastRoot( { variant = "information", dismissible = false, hideProgress = false, hideUndo = false, title, description, progress = 30, undoLabel, className, ...otherProps }: ToastRootProps, ref ) { return (
{title ? ( {title} ) : null} {description ? ( {description} ) : null}
{undoLabel ? ( {undoLabel} ) : null}
); } ); export const Toast = ToastRoot;