import { action, NAME, pattern, UI, type VNode, Writable } from "commonfabric"; // deno-lint-ignore no-empty-interface interface ToastStoryInput {} export interface ToastStoryOutput { [NAME]: string; [UI]: VNode; controls: VNode; } export default pattern(() => { const showDefault = new Writable(false); const showSuccess = new Writable(false); const showError = new Writable(false); const showWarning = new Writable(false); const showAction = new Writable(false); return { [NAME]: "cf-toast Story", [UI]: (
Toast Variants showDefault.set(true))} > Default showSuccess.set(true))} > Success showError.set(true))} > Error showWarning.set(true))} > Warning showAction.set(true))} > With Action showDefault.set(false))} > This is a default notification. showSuccess.set(false))} > Changes saved successfully. showError.set(false))} > Connection lost. Retrying... showWarning.set(false))} > Storage almost full. showAction.set(false))} > Wish sent. View
), controls: <>, }; });