Files
Shahed Nasser d1a1135328 docs: migrate UI docs (#13245)
* docs: create a new UI docs project (#13233)

* docs: create a new UI docs project

* fix installation errors

* docs: migrate UI docs content to new project (#13241)

* Fix content

* added examples for some components

* finish adding examples

* lint fix

* fix build errors

* delete empty files

* path fixes + refactor

* fix build error
2025-08-20 11:42:25 +03:00

95 lines
2.6 KiB
JSON

{
"description": "This component is based on the [Sonner](https://sonner.emilkowal.ski/toast) toast library.",
"methods": [],
"displayName": "Toast",
"props": {
"id": {
"required": true,
"tsType": {
"name": "union",
"raw": "string | number",
"elements": [
{
"name": "string"
},
{
"name": "number"
}
]
},
"description": "Optional ID of the toast."
},
"description": {
"required": false,
"tsType": {
"name": "ReactReactNode",
"raw": "React.ReactNode"
},
"description": "The toast's text."
},
"action": {
"required": false,
"tsType": {
"name": "signature",
"type": "object",
"raw": "{ altText: string ; label: string ; onClick: () => void \\| Promise<void> ; variant?: ToastActionVariant }",
"signature": {
"properties": [
{
"key": "altText",
"value": {
"name": "string"
},
"description": "The button's alt text."
},
{
"key": "label",
"value": {
"name": "string"
},
"description": "The button's text."
},
{
"key": "onClick",
"value": {
"name": "signature",
"type": "function",
"raw": "() => void \\| Promise<void>",
"signature": {
"arguments": [],
"return": {
"name": "void \\| Promise<void>"
}
}
},
"description": "The function to execute when the button is clicked."
},
{
"key": "variant",
"value": {
"name": "ToastActionVariant",
"elements": [
{
"name": "union",
"raw": "\"default\" \\| \"destructive\"",
"elements": [
{
"name": "\"default\""
},
{
"name": "\"destructive\""
}
]
}
],
"raw": "ToastActionVariant"
},
"description": "The button's variant."
}
]
}
},
"description": "The toast's action buttons."
}
}
}