Raw
1 {
2 "description": "This component is based on the [Sonner](https://sonner.emilkowal.ski/toast) toast library.",
3 "methods": [],
4 "displayName": "Toast",
5 "props": {
6 "id": {
7 "required": true,
8 "tsType": {
9 "name": "union",
10 "raw": "string | number",
11 "elements": [
12 {
13 "name": "string"
14 },
15 {
16 "name": "number"
17 }
18 ]
19 },
20 "description": "Optional ID of the toast."
21 },
22 "description": {
23 "required": false,
24 "tsType": {
25 "name": "ReactReactNode",
26 "raw": "React.ReactNode"
27 },
28 "description": "The toast's text."
29 },
30 "action": {
31 "required": false,
32 "tsType": {
33 "name": "signature",
34 "type": "object",
35 "raw": "{ altText: string ; label: string ; onClick: () => void \\| Promise<void> ; variant?: ToastActionVariant }",
36 "signature": {
37 "properties": [
38 {
39 "key": "altText",
40 "value": {
41 "name": "string"
42 },
43 "description": "The button's alt text."
44 },
45 {
46 "key": "label",
47 "value": {
48 "name": "string"
49 },
50 "description": "The button's text."
51 },
52 {
53 "key": "onClick",
54 "value": {
55 "name": "signature",
56 "type": "function",
57 "raw": "() => void \\| Promise<void>",
58 "signature": {
59 "arguments": [],
60 "return": {
61 "name": "void \\| Promise<void>"
62 }
63 }
64 },
65 "description": "The function to execute when the button is clicked."
66 },
67 {
68 "key": "variant",
69 "value": {
70 "name": "ToastActionVariant",
71 "elements": [
72 {
73 "name": "union",
74 "raw": "\"default\" \\| \"destructive\"",
75 "elements": [
76 {
77 "name": "\"default\""
78 },
79 {
80 "name": "\"destructive\""
81 }
82 ]
83 }
84 ],
85 "raw": "ToastActionVariant"
86 },
87 "description": "The button's variant."
88 }
89 ]
90 }
91 },
92 "description": "The toast's action buttons."
93 }
94 }
95 }