Skip to content

Commit

Permalink
feat(ui): improve types (#11085)
Browse files Browse the repository at this point in the history
* feat(ui): improve types

Co-authored-by: Yusuf Kandemir <yusuf.kandemir@outlook.com.tr>
  • Loading branch information
Shinigami92 and yusufkandemir committed Oct 26, 2021
1 parent 26abd7c commit 5cbf651
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
26 changes: 25 additions & 1 deletion ui/src/components/option-group/QOptionGroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,31 @@

"options": {
"type": "Array",
"desc": "Array of objects with value and label props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
"desc": "Array of objects with value, label, and disable(optional) props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
"definition": {
"label": {
"type": "String",
"desc": "Label to display along the component",
"required": true,
"examples": [ "Option 1", "Option 2", "Option 3" ]
},
"value": {
"type": "Any",
"desc": "Value of the option that will be used by the component model",
"required": true,
"examples": [ "op1", "op2", "op3" ]
},
"disable": {
"type": "Boolean",
"desc": "If true, the option will be disabled",
"default": false,
},
"...props": {
"type": "Any",
"desc": "Any other props from QToggle, QCheckbox, or QRadio",
"examples": [ "val=\"car\"", ":true-value=\"trueValue\"", "checked-icon=\"visibility\"" ]
}
},
"examples": [
":options=\"[ { label: 'Option 1', value: 'op1' }, { label: 'Option 2', value: 'op2' }, { label: 'Option 3', value: 'op3', disable: true } ]\""
],
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/table/QTable.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"align": {
"type": "String",
"desc": "Horizontal alignment of cells in this column",
"values": [ "left", "right", "center" ],
"default": "right",
"examples": [ "left", "right", "center" ]
},
Expand Down

0 comments on commit 5cbf651

Please sign in to comment.