import "./components/ui/tidal.css"; import { useState, useRef } from "react"; import { Plus } from "lucide-react"; import { TidalNotificationStack, type TidalNotification } from "./components/ui/notification-stack"; import "./components/ui/notification-stack.css"; import { TidalButton } from "./components/ui/tidal-button"; const tidalExampleStyles = ".demo-footnote{font-size:11px;color:var(--t-muted);margin-top:12px}\n\n.notifications-specimen{width:100%;max-width:350px}.notifications-specimen>.tidal-button{display:flex;margin:17px auto 0;font-size:11px}.notifications-specimen>.demo-footnote{text-align:center;font-size:11px}"; export function NotificationDemo() { const [notifications, setNotifications] = useState([ { id: "welcome", title: "Workspace ready", description: "The sample workspace is ready.", tone: "success", }, { id: "invite", title: "Teammate invited", description: "The sample teammate was added to the project.", tone: "info", }, ]); const count = useRef(0); return (
setNotifications((items) => items.filter((item) => item.id !== id)) } /> { count.current += 1; const id = "new-" + count.current; const next: TidalNotification = { id, title: "Changes saved", description: "The local sample was updated.", tone: "success", }; setNotifications((items) => [...items, next].slice(-3)); }} >

Dismiss one. Add another. Press F8 to focus.

); } export default function AgentExample() { return (
); }