docs: added documentation for toast component changes (#7141)

* docs: added documentation for toast component changes

* added redirect from use-toast docs to upgrade guide

* remove unused file

* content linting fixes

* update UI package version

* updated ui preset

* fix upgrade guides main page
This commit is contained in:
Shahed Nasser
2024-05-01 18:12:10 +03:00
committed by GitHub
parent 8387d03370
commit b6083ce104
24 changed files with 559 additions and 343 deletions

View File

@@ -1,6 +1,95 @@
{
"description": "",
"description": "This component is based on the [Toaster component of the Sonner library](https://sonner.emilkowal.ski/toaster).",
"methods": [],
"displayName": "Toaster",
"props": {}
"props": {
"position": {
"defaultValue": {
"value": "\"bottom-right\"",
"computed": false
},
"description": "The position of the created toasts.",
"tsType": {
"name": "Position",
"elements": [
{
"name": "union",
"raw": "\"top-left\" \\| \"top-right\" \\| \"bottom-left\" \\| \"bottom-right\" \\| \"top-center\" \\| \"bottom-center\"",
"elements": [
{
"name": "literal",
"value": "\"top-left\""
},
{
"name": "literal",
"value": "\"top-right\""
},
{
"name": "literal",
"value": "\"bottom-left\""
},
{
"name": "literal",
"value": "\"bottom-right\""
},
{
"name": "literal",
"value": "\"top-center\""
},
{
"name": "literal",
"value": "\"bottom-center\""
}
]
}
],
"raw": "Position"
},
"required": false
},
"gap": {
"defaultValue": {
"value": "12",
"computed": false
},
"description": "The gap between the toast components.",
"tsType": {
"name": "number"
},
"required": false
},
"offset": {
"defaultValue": {
"value": "24",
"computed": false
},
"description": "The space from the edges of the screen.",
"tsType": {
"name": "union",
"raw": "string \\| number",
"elements": [
{
"name": "string"
},
{
"name": "number"
}
]
},
"required": false
},
"duration": {
"description": "The time in milliseconds that a toast is shown before it's\nautomatically dismissed.\n\n",
"tsType": {
"name": "number"
},
"defaultValue": {
"value": "4000",
"computed": false
}
}
},
"composes": [
"Omit"
]
}