import React, { useState } from "react"; import { Button, BUTTON_VARIANT, BUTTON_SIZE } from "../../Button"; import { Flex } from "../../Flex"; import { showToast, ShowToastProps } from "../Toast"; import { Label } from "../../Label"; import { Input } from "../../Input"; import { STATUS_VARIANT } from "../../../types"; import { Radio } from "../../Radio"; import { Heading } from "../../Heading"; import { Panel } from "../../Panel"; import { Checkbox } from "../../Checkbox"; import { Description } from "../../Description"; export const ShowToastButton = ({ toastProps, buttonLabel, }: { toastProps: ShowToastProps; buttonLabel: string; }) => ( ); export const ToastSandbox = ({ toastProps, buttonLabel, }: { toastProps: ShowToastProps; buttonLabel: string; }) => { const [duration, setDuration] = useState(5000); const [disableProgress, setDisableProgress] = useState(false); const [variant, setVariant] = useState(STATUS_VARIANT.DEFAULT); return ( The amount of time the toast appears on-screen. setDuration(Number(e.target.value))} className="w-40" /> {duration === 5000 ? ( Default ) : ( )} setDisableProgress(!disableProgress)} /> The variant prop changes the bottom border color of the toast. {Object.values(STATUS_VARIANT).map((v) => ( setVariant(v)} checked={v === variant} id={`sandbox-variant-${v}`} name="sandbox-variant" /> ))} ); }; export const ToastPreviewContainer = ({ children, }: { children: React.ReactNode; }) => { return {children}; }; export const ToastPreview = ({ heading, children, }: { heading: string; children: React.ReactNode; }) => { return ( {heading} {children} ); };