1919 {{ tooltip }}
2020 </v-tooltip >
2121 </template >
22- <v-icon v-if =" isRound || isUncontained" :size =" iconSize" :class =" iconClass" class =" ml-[4%] mt-[4%]" >
23- {{ icon }}
24- </v-icon >
25- <div v-else class =" flex items-center justify-center w-full h-full" >
26- <v-icon :size =" iconSize" class =" mr-2" :class =" iconClass" >
27- {{ icon }}
28- </v-icon >
29- <div class =" text-white ml-2" :class =" labelClass" >
22+ <Icon v-if =" isRound || isUncontained" :icon =" icon || ''" :width =" iconSize" :class =" iconClass" class =" -mr-[1px]" />
23+ <div v-else class =" flex items-center align-center justify-center w-full h-full" >
24+ <Icon :icon =" icon || ''" :width =" iconSize" :class =" iconClass" />
25+ <div class =" text-white" :class =" labelClass" >
3026 {{ label }}
3127 </div >
3228 </div >
4238</template >
4339
4440<script setup lang="ts">
41+ import { Icon , IconifyIcon } from ' @iconify/vue'
4542import { computed } from ' vue'
4643
4744const props = defineProps <{
@@ -56,7 +53,7 @@ const props = defineProps<{
5653 /**
5754 * The icon to display in the button (prepend on rectangular, centered on round).
5855 */
59- icon? : string
56+ icon? : string | IconifyIcon
6057 /**
6158 * Additional Tailwind classes for the icon.
6259 */
@@ -102,7 +99,8 @@ const tooltip = computed(() => props.tooltip)
10299const selected = computed (() => props .selected )
103100const isRound = computed (() => props .variant === ' round' )
104101const isUncontained = computed (() => props .variant === ' uncontained' )
105- const iconSize = computed (() => (isRound .value ? (props .width || 26 ) * 0.6 : props .iconSize ))
102+ const iconSize = computed (() => (isRound .value ? (props .width || 26 ) * 0.666 : props .iconSize ))
103+ const iconClass = computed (() => props .iconClass )
106104
107105const buttonStyle = computed (() => ({
108106 width: props .width || 40 ,
0 commit comments