forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

flash.ts11 lines, 422 bytesHistoryRawDownload
1import { createSignal, type Accessor } from "solid-js";
2import { showToast } from "@/components/ui/toast";
3
4/** Short-lived success feedback; page banners stay empty, global toast renders it. */
5export function createFlash(_ms = 3000): [Accessor<string>, (text: string) => void] {
6 const [message, setMessage] = createSignal("");
7 return [message, (text) => {
8 setMessage("");
9 showToast({ title: text });
10 }];
11}