Skip to content

Commit 82f0782

Browse files
committed
Replace ripple object to individual props with single responsibility
1 parent 1b1e535 commit 82f0782

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/FAB.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</ul>
1515
</transition>
1616
</div>
17-
<template v-if="ripple.show">
18-
<div v-ripple="ripple.color == 'light' ? 'rgba(255, 255, 255, 0.35)' : ''" @click="toggle = !toggle"
17+
<template v-if="rippleShow">
18+
<div v-ripple="rippleColor == 'light' ? 'rgba(255, 255, 255, 0.35)' : ''" @click="toggle = !toggle"
1919
class="fab pointer" :style="{ 'background-color': bgColor }"
2020
>
2121
<i class="material-icons md-36" :class="{ rotate: toggle }">add</i>
@@ -54,13 +54,11 @@
5454
zIndex: {
5555
default: '999',
5656
},
57-
ripple: {
58-
default() {
59-
return {
60-
show: true,
61-
color: 'light'
62-
}
63-
}
57+
rippleShow : {
58+
default: true
59+
},
60+
rippleColor: {
61+
default: 'light'
6462
},
6563
actions: {}
6664
},

0 commit comments

Comments
 (0)