docs: generate documentation for UI components (#5849)
* added tool to generate spec files for React components * use typedoc for missing descriptions and types * improvements and fixes * improvements * added doc comments for half of the components * add custom resolver + more doc comments * added all tsdocs * general improvements * add specs to UI docs * added github action * remove unnecessary api route * Added readme for react-docs-generator * remove comment * Update packages/design-system/ui/src/components/currency-input/currency-input.tsx Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> * remove description of aria fields + add generate script --------- Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
This commit is contained in:
88
www/apps/ui/src/specs/Button/Button.json
Normal file
88
www/apps/ui/src/specs/Button/Button.json
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"description": "This component is based on the `button` element and supports all of its props",
|
||||
"methods": [],
|
||||
"displayName": "Button",
|
||||
"props": {
|
||||
"isLoading": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
},
|
||||
"description": "Whether to show a loading spinner.",
|
||||
"defaultValue": {
|
||||
"value": "false",
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"asChild": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
},
|
||||
"description": "Whether to remove the wrapper `button` element and use the\npassed child element instead.",
|
||||
"defaultValue": {
|
||||
"value": "false",
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"variant": {
|
||||
"defaultValue": {
|
||||
"value": "\"primary\"",
|
||||
"computed": false
|
||||
},
|
||||
"description": "The button's style.",
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "\"primary\" \\| \"secondary\" \\| \"transparent\" \\| \"danger\"",
|
||||
"elements": [
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"primary\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"secondary\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"transparent\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"danger\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": false
|
||||
},
|
||||
"size": {
|
||||
"defaultValue": {
|
||||
"value": "\"base\"",
|
||||
"computed": false
|
||||
},
|
||||
"description": "The button's size.",
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "\"base\" \\| \"large\" \\| \"xlarge\"",
|
||||
"elements": [
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"base\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"large\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"xlarge\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"composes": [
|
||||
"VariantProps"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user