Skip to content

Commit 50744a4

Browse files
committed
chore(docs): add QIconPicker JSON API
1 parent 9606739 commit 50744a4

File tree

1 file changed

+38
-28
lines changed

1 file changed

+38
-28
lines changed

src/component/QIconPicker.json

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"props": {
44
"value": {
55
"type": "String",
6-
"desc": "Vue v-model value",
6+
"desc": "`v-model`; The selected icon",
77
"default": "",
88
"examples": [
9-
"calendar-today",
10-
"bolt"
9+
"v-model=\"calendar-today\"",
10+
"v-model=\"bolt\""
1111
]
1212
},
1313
"icon-set": {
@@ -23,25 +23,31 @@
2323
"fontawesome-v5",
2424
"eva-icons",
2525
"themify"
26+
],
27+
"examples": [
28+
"icon-set=\"material-icons\"",
29+
"icon-set=\"fontawesome-v5\""
2630
]
2731
},
2832
"icons": {
2933
"type": "Array",
30-
"desc": "An array of objects containing icon information. The object must contain the key 'name' with the value being the icon name (ie: { name: 'bolt' }). Note: the icons used must already be loaded.",
34+
"desc": "An array of objects containing icon information. The object must contain the key `name` with the value being the icon name (ie: `{ name: 'bolt' }`). _**Note:** the icons used must already be loaded by Quasar._",
35+
"examples": [
36+
":icons=\"[{ name: 'calendar-today'}, { name: 'bolt'}]\""
37+
],
3138
"definition": {
3239
"name": {
3340
"type": "String",
34-
"desc": "The icon name",
35-
"examples": [
36-
"calendar-today",
37-
"bolt"
38-
]
41+
"desc": "The icon name"
3942
}
4043
}
4144
},
4245
"filter": {
4346
"type": "String",
44-
"desc": "Icons will be filtered by the passed string"
47+
"desc": "Icons will be filtered by the passed string",
48+
"examples": [
49+
":filter=\"myFilter\""
50+
]
4551
},
4652
"dense": {
4753
"type": "Boolean",
@@ -53,66 +59,70 @@
5359
},
5460
"no-footer": {
5561
"type": "Boolean",
56-
"desc": "hides the footer area that contains the pagination"
62+
"desc": "hides the footer area when `pagination` is enabled"
5763
},
5864
"color": {
5965
"type": "String",
60-
"desc": "This can be any CSS color value or Quasar color",
66+
"desc": "Any color from the [Quasar Color Pallete](https://quasar.dev/style/color-palette) or a CSS color (#, rgb, rgba, hls, etc)",
6167
"examples": [
62-
"orange-8",
63-
"#c8c8c8"
68+
"color=\"orange-8\"",
69+
"color=\"#c8c8c8\""
6470
]
6571
},
6672
"background-color": {
6773
"type": "String",
68-
"desc": "This can be any CSS color value or Quasar color",
74+
"desc": "Any color from the [Quasar Color Pallete](https://quasar.dev/style/color-palette) or a CSS color (#, rgb, rgba, hls, etc)",
6975
"examples": [
70-
"orange-8",
71-
"#c8c8c8"
76+
"background-color=\"orange-8\"",
77+
"background-color=\"#c8c8c8\""
7278
]
7379
},
7480
"selected-color": {
7581
"type": "String",
76-
"desc": "This can be any CSS color value or Quasar color",
82+
"desc": "Any color from the [Quasar Color Pallete](https://quasar.dev/style/color-palette) or a CSS color (#, rgb, rgba, hls, etc)",
7783
"examples": [
78-
"orange-8",
79-
"#c8c8c8"
84+
"selected-color=\"orange-8\"",
85+
"selected-color=\"#c8c8c8\""
8086
]
8187
},
8288
"selected-background-color": {
8389
"type": "String",
84-
"desc": "This can be any CSS color value or Quasar color",
90+
"desc": "Any color from the [Quasar Color Pallete](https://quasar.dev/style/color-palette) or a CSS color (#, rgb, rgba, hls, etc)",
8591
"examples": [
86-
"orange-8",
87-
"#c8c8c8"
92+
"selected-background-color=\"orange-8\"",
93+
"selected-background-color=\"#c8c8c8\""
8894
]
8995
},
9096
"font-size": {
9197
"type": "String",
9298
"desc": "The font-size to use for the icons. Any acceptable CSS size can be used",
9399
"examples": [
94-
"3rem",
95-
"24px"
100+
"font-size=\"3rem\"",
101+
"font-size=\"24px\""
96102
]
97103
},
98104
"pagination": {
99105
"type": "Object",
106+
"sync": true,
100107
"desc": "For pagination purposes uses Quasar's pagination component. Use `pagination.sync` to synchronize the data. You can use `page` and `itemsPerPage` to control the pagination. QIconPicker will set `totalPages` depending on `icon-set` or `icons` properties. If using a `filter` the page will automatically be reset to 1",
101108
"examples": [
102-
":pagination.sync=\"pagination\""
109+
":pagination.sync=\"myPagination\""
103110
]
104111
}
105112
},
106113
"events": {
107114
"input": {
108115
"type": "String",
109-
"desc": "Value from when the selection changes"
116+
"desc": "`v-model`; Value from when the selection changes"
110117
}
111118
},
112119
"scopedSlots": {
113120
"icon": {
114121
"type": "String",
115-
"desc": "Slot for re-displaying icon"
122+
"desc": "Slot for changing the display of the icon",
123+
"examples":[
124+
"<template #icon=\"name\"><q-btn :name=\"name\" :label=\"name\" no-caps /></template>"
125+
]
116126
}
117127
}
118128
}

0 commit comments

Comments
 (0)