Skip to content

Commit d3a6435

Browse files
committed
feat(QFab): refine the hide-icon prop quasarframework#6753
1 parent 7b35bed commit d3a6435

File tree

7 files changed

+27
-28
lines changed

7 files changed

+27
-28
lines changed

ui/dev/src/pages/components/fab-extended.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
:square="fabSquare"
4242
:external-label="fabExternalLabel"
4343
:hide-label="hideLabel"
44-
:hide-icon="hideIcon"
4544
:label-class="labelClass"
4645
/>
4746
<q-fab-action
@@ -54,7 +53,6 @@
5453
:square="fabSquare"
5554
:external-label="fabExternalLabel"
5655
:hide-label="hideLabel"
57-
:hide-icon="hideIcon"
5856
:label-class="labelClass"
5957
/>
6058
<q-fab-action
@@ -65,7 +63,6 @@
6563
:square="fabSquare"
6664
:external-label="fabExternalLabel"
6765
:hide-label="hideLabel"
68-
:hide-icon="hideIcon"
6966
:label-class="labelClass"
7067
/>
7168
<q-fab-action
@@ -78,7 +75,6 @@
7875
:square="fabSquare"
7976
:external-label="fabExternalLabel"
8077
:hide-label="hideLabel"
81-
:hide-icon="hideIcon"
8278
:label-class="labelClass"
8379
/>
8480
<q-fab-action
@@ -89,7 +85,6 @@
8985
:square="fabSquare"
9086
:external-label="fabExternalLabel"
9187
:hide-label="hideLabel"
92-
:hide-icon="hideIcon"
9388
:label-class="labelClass"
9489
/>
9590
<q-fab-action
@@ -102,7 +97,6 @@
10297
:square="fabSquare"
10398
:external-label="fabExternalLabel"
10499
:hide-label="hideLabel"
105-
:hide-icon="hideIcon"
106100
:label-class="labelClass"
107101
/>
108102
<q-fab-action
@@ -113,7 +107,6 @@
113107
:square="fabSquare"
114108
:external-label="fabExternalLabel"
115109
:hide-label="hideLabel"
116-
:hide-icon="hideIcon"
117110
:label-class="labelClass"
118111
/>
119112
<q-fab-action
@@ -124,7 +117,6 @@
124117
:square="fabSquare"
125118
:external-label="fabExternalLabel"
126119
:hide-label="hideLabel"
127-
:hide-icon="hideIcon"
128120
:label-class="labelClass"
129121
/>
130122
<q-fab-action
@@ -136,7 +128,6 @@
136128
:square="fabSquare"
137129
:external-label="fabExternalLabel"
138130
:hide-label="hideLabel"
139-
:hide-icon="hideIcon"
140131
:label-class="labelClass"
141132
/>
142133
</q-fab>

ui/src/components/fab/QFab.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export default Vue.extend({
3030
},
3131

3232
props: {
33+
icon: String,
3334
activeIcon: String,
3435

36+
hideIcon: Boolean,
3537
hideLabel: {
3638
default: null
3739
},

ui/src/components/fab/QFab.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
"category": "model"
88
},
99

10+
"icon": {
11+
"extends": "icon"
12+
},
13+
14+
"active-icon": {
15+
"extends": "icon"
16+
},
17+
18+
"hide-icon": {
19+
"type": "Boolean",
20+
"desc": "Hide the icon (don't use any)",
21+
"category": "style|content",
22+
"addedIn": "v1.9.14"
23+
},
24+
1025
"direction": {
1126
"type": "String",
1227
"desc": "Direction to expand Fab Actions to",
@@ -29,10 +44,6 @@
2944
"type": "Boolean",
3045
"desc": "By default, Fab Actions are hidden when user navigates to another route and this prop disables this behavior",
3146
"category": "behavior"
32-
},
33-
34-
"active-icon": {
35-
"extends": "icon"
3647
}
3748
},
3849

ui/src/components/fab/QFabAction.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export default Vue.extend({
2121
mixins: [ FabMixin ],
2222

2323
props: {
24+
icon: {
25+
type: String,
26+
default: ''
27+
},
28+
2429
anchor: {
2530
type: String,
2631
validator: v => anchorValues.includes(v)
@@ -55,7 +60,7 @@ export default Vue.extend({
5560
render (h) {
5661
const child = []
5762

58-
this.hideIcon !== true && child.push(
63+
this.icon !== '' && child.push(
5964
h(QIcon, {
6065
props: { name: this.icon }
6166
})

ui/src/components/fab/QFabAction.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"mixins": [ "mixins/fab" ],
33

44
"props": {
5+
"icon": {
6+
"extends": "icon"
7+
},
8+
59
"anchor": {
610
"type": "String",
711
"desc": "How to align the Fab Action relative to Fab expand side; By default it uses the align specified in QFab",

ui/src/mixins/fab.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ export default {
1616

1717
square: Boolean,
1818

19-
icon: String,
20-
hideIcon: Boolean,
21-
2219
label: {
2320
type: [ String, Number ],
2421
default: ''

ui/src/mixins/fab.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,6 @@
5757
"category": "style"
5858
},
5959

60-
"icon": {
61-
"extends": "icon"
62-
},
63-
64-
"hide-icon": {
65-
"type": "Boolean",
66-
"desc": "Hide the icon (don't use any)",
67-
"category": "style|content",
68-
"addedIn": "v1.9.14"
69-
},
70-
7160
"external-label": {
7261
"type": "Boolean",
7362
"desc": "Display label besides the FABs, as external content",

0 commit comments

Comments
 (0)