Skip to content

Commit dfff7ec

Browse files
authored
feat(Notify): allow passing class and style for action buttons (quasarframework#8298)
1 parent a8e2e09 commit dfff7ec

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/src/plugins/Notify.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ const Notifications = {
166166
: this.$q.lang.label.close
167167
})
168168

169-
notif.actions = actions.map(({ handler, noDismiss, attrs, ...item }) => ({
170-
props: { flat: true, ...item },
169+
notif.actions = actions.map(({ handler, noDismiss, style, class: klass, attrs, ...props }) => ({
170+
staticClass: klass,
171+
style,
172+
props: { flat: true, ...props },
171173
attrs,
172174
on: {
173175
click: typeof handler === 'function'
@@ -457,7 +459,7 @@ const Notifications = {
457459
notif.actions !== void 0 && child.push(
458460
h('div', {
459461
staticClass: meta.actionsClass
460-
}, notif.actions.map(a => h(QBtn, { props: a.props, attrs: a.attrs, on: a.on })))
462+
}, notif.actions.map(action => h(QBtn, { ...action })))
461463
)
462464

463465
meta.badge > 1 && child.push(

0 commit comments

Comments
 (0)