Skip to content

Commit

Permalink
fix(ui): list actions in quasarConfOptions for Notify (#16102)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir authored Jul 24, 2023
1 parent 4bc7cee commit ee6cb74
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/build/build.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function isClassStyleType (type) {
return hits === 3
}

const serializableTypes = [ 'Boolean', 'Number', 'String', 'Array', 'Object' ]
const serializableTypes = [ 'Any', 'Boolean', 'Number', 'String', 'Array', 'Object' ]
function isSerializable (value) {
const types = Array.isArray(value.type) ? value.type : [ value.type ]

Expand Down
20 changes: 20 additions & 0 deletions ui/src/plugins/Notify.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,26 @@
"default": 5000
},

"actions": {
"type": "Array",
"tsType": "QNotifyAction",
"desc": "Notification actions (buttons); Unless 'noDismiss' is true, clicking/tapping on the button will close the notification; Also check 'closeBtn' convenience prop",
"definition": {
"noDismiss": {
"type": "Boolean",
"desc": "Do not dismiss the notification when the button is clicked/tapped"
},
"...": {
"type": "Any",
"desc": "Any other QBtn prop expect 'onClick' (use 'handler' instead)",
"examples": [ "label: 'Learn more'", "color: 'primary'" ]
}
},
"examples": [
"[ { label: 'Show', handler: () => {}, 'aria-label': 'Button label' }, { icon: 'map', handler: () => {}, color: 'yellow' }, { label: 'Learn more', noDismiss: true, handler: () => {} } ]"
]
},

"closeBtn": {
"type": [ "Boolean", "String" ],
"desc": "Convenient way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label according to the current Quasar language",
Expand Down

0 comments on commit ee6cb74

Please sign in to comment.