From 164f41124d093ef823d6738a8f35e4f07fc61bf9 Mon Sep 17 00:00:00 2001 From: Caleb Jacob Date: Wed, 13 Nov 2024 10:02:01 -0700 Subject: [PATCH] Fix button icon width --- package.json | 2 +- src/components/Button.module.scss | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bb6e304..386bfef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@near-pagoda/ui", - "version": "2.0.16", + "version": "2.0.17", "description": "A React component library that implements the official NEAR design system.", "license": "MIT", "repository": { diff --git a/src/components/Button.module.scss b/src/components/Button.module.scss index 3a13212..96a4a44 100644 --- a/src/components/Button.module.scss +++ b/src/components/Button.module.scss @@ -35,10 +35,6 @@ --button-color-border: var(--violet-9) !important; } - &[data-icon='true'] { - --button-width: calc(var(--button-height) - 2px); // Subtract border width - } - &[data-size='x-small'] { --button-font: var(--text-xs); --button-gap: 4px; @@ -61,6 +57,11 @@ --button-padding-x: 24px; } + &[data-icon='true'] { + --button-width: var(--button-height); + --button-padding-x: 0px; + } + &[data-variant='primary'] { &[data-fill='ghost'], &[data-fill='outline'] {