Skip to content

Commit

Permalink
fix(BaseButton): refactor badge class in BaseButton.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
driss-chelouati committed Dec 18, 2023
1 parent ef4f8cb commit 95c568a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/base/BaseButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const shadows = {
const badges = computed(() =>
props.badge && ['default', 'light', 'muted', 'none'].includes(color.value)
? ''
: `nui-button-badge ${badgeColors[color.value]}`,
: `${badgeColors[color.value]}`,
)
const classes = computed(() => [
Expand All @@ -166,7 +166,7 @@ const { attributes, is } = useNinjaButton(props)
<component :is="is" v-bind="attributes" :class="classes">
<slot v-if="!props.loading" />
<BasePlaceload v-else class="h-4 w-12 rounded" />
<span v-if="props.badge" :class="badges">
<span v-if="props.badge" class="nui-button-badge" :class="badges">
<span v-if="props.badgePulse" class="nui-button-badge-pulse"></span>
<span class="nui-button-badge-inner"></span>
</span>
Expand Down

0 comments on commit 95c568a

Please sign in to comment.