import { Toaster, toast } from "@godxjp/ui/feedback"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { Button } from "@godxjp/ui/general"; import { Flex, PageContainer } from "@godxjp/ui/layout"; /** * Toast (Toaster + sonner) · transient ephemeral feedback. Mount ONE * at app root. Fire through the public @godxjp/ui/feedback toast export. */ export default function Demo() { return ( {/* Mount Toaster once · in a real app this lives in the root layout */} Toast variants Import toast from sonner (not @godxjp/ui). success / error / warning / info for the four semantic variants. Toasts auto-dismiss · use Alert for persistent messages. Programmatic dismiss Keep the returned id and dismiss a specific toast explicitly. Soft destructive with undo action After a delete, surface an undo action via the toast action option. The user can recover without a confirmation modal. Promise toast (loading → success/error) toast.promise() tracks an async operation automatically · shows a loading state then resolves to success or error. Ideal for background exports or bulk imports. ); }