11<template >
22 <component :is =" tag" :class =" btnClasses" :type =" type" :role =" role" @click =" handleClick" >
3- <fa v-if =" (icon && !iconRight)" :icon =" icon" :class =" iconClasses" :color =" iconColor" />
3+ <mdb-icon v-if =" (icon && !iconRight)" :icon =" icon" :far = " far || regular " :fal = " fal || light " :fab = " fab || brands " :class =" iconClasses" :color =" iconColor" />
44 <slot ></slot >
5- <fa v-if =" (icon && iconRight)" :icon =" icon" :class =" iconClasses" :color =" iconColor" />
5+ <mdb-icon v-if =" (icon && iconRight)" :icon =" icon" :far = " far || regular " :fal = " fal || light " :fab = " fab || brands " :class =" iconClasses" :color =" iconColor" />
66 </component >
77</template >
88
99<script >
1010import classNames from ' classnames' ;
1111import waves from ' ../mixins/waves' ;
12- import Fa from ' ./Fa' ;
12+ import mdbIcon from ' ./Fa' ;
1313
1414const Btn = {
1515 components: {
16- Fa
16+ mdbIcon
1717 },
1818 props: {
1919 tag: {
@@ -22,7 +22,6 @@ const Btn = {
2222 },
2323 color: {
2424 type: String ,
25- default: " default"
2625 },
2726 outline: {
2827 type: String ,
@@ -100,6 +99,30 @@ const Btn = {
10099 },
101100 iconColor: {
102101 type: String
102+ },
103+ far: {
104+ type: Boolean ,
105+ default: false
106+ },
107+ regular: {
108+ type: Boolean ,
109+ default: false
110+ },
111+ fal: {
112+ type: Boolean ,
113+ default: false
114+ },
115+ light: {
116+ type: Boolean ,
117+ default: false
118+ },
119+ fab: {
120+ type: Boolean ,
121+ default: false
122+ },
123+ brands: {
124+ type: Boolean ,
125+ default: false
103126 }
104127 },
105128 methods: {
@@ -113,19 +136,20 @@ const Btn = {
113136 return classNames (
114137 this .floating ? ' btn-floating' : ' btn' ,
115138 this .outline ? ' btn-outline-' + this .outline : this .flat ? ' btn-flat' : this .transparent ? ' ' : ' btn-' + this .color ,
116- this .size ? ' btn-' + this .size : ' ' ,
117- this .block ? ' btn-block' : ' ' ,
118- this .disabled ? ' disabled' : ' ' ,
119- this .gradient ? this .gradient + ' -gradient' : ' ' ,
120- this .rounded ? ' btn-rounded' : ' ' ,
121- this .action ? ' btn-action' : ' ' ,
122- this .save ? ' btn-save' : ' ' ,
123- this .active ? ' active' : ' ' ,
124- this .waves ? ' ripple-parent' : ' '
139+ this .size && ' btn-' + this .size ,
140+ this .block && ' btn-block' ,
141+ this .disabled && ' disabled' ,
142+ this .gradient && this .gradient + ' -gradient' ,
143+ this .rounded && ' btn-rounded' ,
144+ this .action && ' btn-action' ,
145+ this .save && ' btn-save' ,
146+ this .active && ' active' ,
147+ this .waves && ' ripple-parent'
125148 );
126149 },
127150 iconClasses () {
128151 return classNames (
152+ ' px-1' ,
129153 this .iconClass
130154 );
131155 }
0 commit comments