From 69ee9de47450e59412d7e98fba2a752a7d923c22 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Thu, 26 Sep 2024 19:40:44 +0800 Subject: [PATCH] pkp/pkp-lib#10447 Adjust button size in ButtonIcon component --- .../ButtonIcon/ButtonIcon.stories.js | 26 +++++++++++++++++++ src/components/ButtonIcon/ButtonIcon.vue | 6 ++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/components/ButtonIcon/ButtonIcon.stories.js b/src/components/ButtonIcon/ButtonIcon.stories.js index 0c664b3a8..b9b17634f 100644 --- a/src/components/ButtonIcon/ButtonIcon.stories.js +++ b/src/components/ButtonIcon/ButtonIcon.stories.js @@ -33,3 +33,29 @@ export const Active = { isActive: true, }, }; + +export const Order = { + render: (args) => ({ + components: {ButtonIcon}, + setup() { + return {args}; + }, + template: ` +
+ +
+ `, + }), + args: { + icons: [ + { + icon: 'ChevronUp', + ariaLabel: 'Move up', + }, + { + icon: 'ChevronDown', + ariaLabel: 'Move down', + }, + ], + }, +}; diff --git a/src/components/ButtonIcon/ButtonIcon.vue b/src/components/ButtonIcon/ButtonIcon.vue index ad1032ee8..f5e5928f8 100644 --- a/src/components/ButtonIcon/ButtonIcon.vue +++ b/src/components/ButtonIcon/ButtonIcon.vue @@ -1,6 +1,6 @@ @@ -33,9 +33,9 @@ const props = defineProps({ const styles = computed(() => ({ // Base - 'inline-flex relative items-center justify-center text-lg-semibold rounded w-9 h-9': true, + 'inline-flex relative items-center justify-center text-lg-semibold rounded w-6 h-6': true, // Default - 'text-primary bg-secondary': !props.isActive, + 'text-primary': !props.isActive, // Hover 'hover:text-on-dark hover:bg-hover': !props.isDisabled, // Active