mirror of
https://github.com/cosscom/coss.git
synced 2026-09-14 20:06:50 +08:00
16 lines
888 B
JSON
16 lines
888 B
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "toast-loading",
|
|
"type": "registry:example",
|
|
"description": "Loading toast",
|
|
"registryDependencies": ["@coss/toast"],
|
|
"files": [
|
|
{
|
|
"path": "registry/default/examples/toast-loading.tsx",
|
|
"content": "\"use client\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { toastManager } from \"@/registry/default/ui/toast\"\n\nexport default function ToastLoading() {\n return (\n <Button\n variant=\"outline\"\n onClick={() => {\n toastManager.add({\n title: \"Loading…\",\n description: \"Please wait while we process your request.\",\n type: \"loading\",\n })\n }}\n >\n Loading Toast\n </Button>\n )\n}\n",
|
|
"type": "registry:example"
|
|
}
|
|
],
|
|
"categories": ["toast", "button", "loading"]
|
|
}
|