Skip to content

Commit

Permalink
fix: button icon size (#4038)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem authored Nov 26, 2023
1 parent be26376 commit 5c08b24
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/ui/src/components/va-button/VaButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
</span>
<template v-if="loading">
<slot name="loading" v-bind="{
size: loaderSizeComputed,
size: iconSizeComputed,
color: textColorComputed,
}">
<va-progress-circle
class="va-button__loader"
:size="loaderSizeComputed"
:size="iconSizeComputed"
:color="textColorComputed"
:thickness="0.15"
indeterminate
Expand Down Expand Up @@ -115,7 +115,7 @@ export default defineComponent({
// loader size
const { sizeComputed } = useSize(props)
const loaderSizeComputed = computed(() => {
const iconSizeComputed = computed(() => {
const size = /([0-9]*)(px)/.exec(sizeComputed.value) as null | [string, string, string]
return size ? `${+size[1] / 2}${size[2]}` : sizeComputed.value
})
Expand All @@ -135,6 +135,7 @@ export default defineComponent({
const iconColorComputed = computed(() => props.iconColor ? getColor(props.iconColor) : textColorComputed.value)
const iconAttributesComputed = computed(() => ({
color: iconColorComputed.value,
size: iconSizeComputed.value,
}))
// classes
Expand Down Expand Up @@ -181,7 +182,7 @@ export default defineComponent({
computedClass,
computedStyle,
textColorComputed,
loaderSizeComputed,
iconSizeComputed,
attributesComputed,
wrapperClassComputed,
iconAttributesComputed,
Expand Down

0 comments on commit 5c08b24

Please sign in to comment.