Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ui/src/components/btn-dropdown/QBtnDropdown.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"category": "content|behavior"
},

"icon-size": {
"type": "String",
"desc": "Change icon size e.g. '16px' or '1rem'",
"category": "style"
},

"dropdown-icon": {
"extends": "icon"
},
Expand Down
6 changes: 4 additions & 2 deletions ui/src/components/btn/QBtn.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ export default createComponent({
h(QIcon, {
name: props.icon,
left: props.stack !== true && hasLabel.value === true,
role: 'img'
role: 'img',
...(props.iconSize !== void 0 ? { size: props.iconSize } : {}),
})
)

Expand All @@ -318,7 +319,8 @@ export default createComponent({
h(QIcon, {
name: props.iconRight,
right: props.stack !== true && hasLabel.value === true,
role: 'img'
role: 'img',
...(props.iconSize !== void 0 ? { size: props.iconSize } : {}),
})
)
}
Expand Down
6 changes: 6 additions & 0 deletions ui/src/components/btn/QBtn.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"category": "behavior"
},

"icon-size": {
"type": "String",
"desc": "Change icon size e.g. '16px' or '1rem'",
"category": "style"
},

"dark-percentage": {
"type": "Boolean",
"desc": "Progress bar on the background should have dark color; To be used along with 'percentage' and 'loading' props",
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/btn/use-btn.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const nonRoundBtnProps = {
label: [ Number, String ],
icon: String,
iconRight: String,
iconSize: String,

...btnDesignOptions.reduce(
(acc, val) => (acc[ val ] = Boolean) && acc,
Expand Down