Skip to content

Commit

Permalink
pkp/pkp-lib#10447 Adjust button size for ButtonIcon component
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Sep 23, 2024
1 parent a0369e2 commit 482ef1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/components/ButtonIcon/ButtonIcon.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ export const EnlargedIcon = {
return {args};
},
template: `
enlarged icon: 
<div class="inline-flex gap-1">
<ButtonIcon icon="ChevronUp" :enlarged="true"/>
<ButtonIcon icon="ChevronDown" :enlarged="true" />
</div>
<br>
vs default size:
<div class="inline-flex gap-1">
<ButtonIcon icon="ChevronUp"/>
<ButtonIcon icon="ChevronDown" />
</div>
`,
}),
args: {},
Expand Down
4 changes: 2 additions & 2 deletions src/components/ButtonIcon/ButtonIcon.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<button :class="styles" :aria-label="ariaLabel" :disabled="isDisabled">
<Icon
:class="enlarged ? 'h-12 w-12' : 'h-6 w-6'"
:class="enlarged ? 'h-9 w-9' : 'h-5 w-5'"
:icon="icon"
aria-hidden="true"
/>
Expand Down Expand Up @@ -42,7 +42,7 @@ const props = defineProps({
const styles = computed(() => ({
// Base
'inline-flex relative items-center justify-center text-lg-semibold rounded w-12 h-12': true,
'inline-flex relative items-center justify-center text-lg-semibold rounded w-9 h-9': true,
// Default
'text-primary bg-secondary': !props.isActive,
// Hover
Expand Down

0 comments on commit 482ef1e

Please sign in to comment.