Skip to content

Commit

Permalink
pkp/pkp-lib#9890 Make sizeVariant 'iconOnly' only work when there's a…
Browse files Browse the repository at this point in the history
…n icon supplied in Button component
  • Loading branch information
blesildaramirez committed May 6, 2024
1 parent 6422de2 commit 970d605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
@blur="emit('blur')"
>
<Icon v-if="icon" class="h-5 w-5" :icon="icon" />
<slot v-if="sizeVariant !== 'iconOnly'" />
<span v-else class="sr-only">
<span v-if="sizeVariant === 'iconOnly' && icon" class="sr-only">
<slot />
</span>
<slot v-else />
</component>
</template>

Expand Down

0 comments on commit 970d605

Please sign in to comment.