From c970dcb39e0c408032a1ad81c3bcc738e12f06cc Mon Sep 17 00:00:00 2001 From: Siarhei Iukou Date: Thu, 22 Aug 2024 09:26:35 +0300 Subject: [PATCH] EPMRPP-92701 || Buttons have broken styles --- src/components/button/button.module.scss | 10 ++++++++++ src/components/button/button.tsx | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/button/button.module.scss b/src/components/button/button.module.scss index b826785..27c6201 100644 --- a/src/components/button/button.module.scss +++ b/src/components/button/button.module.scss @@ -33,6 +33,9 @@ &:focus:not(.disabled, :active) { border: 2px solid var(--rp-ui-color-primary-focused); } + svg * { + fill: var(--rp-ui-base-bg-000); + } } .ghost { @@ -51,6 +54,9 @@ border: 2px solid var(--rp-ui-color-primary-focused); color: var(--rp-ui-color-primary-focused); } + svg * { + fill: var(--rp-ui-color-primary-text); + } } .danger { @@ -67,6 +73,9 @@ &:focus:not(.disabled, :active) { border: 2px solid var(--rp-ui-color-error-focused); } + svg * { + fill: var(--rp-ui-base-bg-000); + } } .text { @@ -124,6 +133,7 @@ .icon-start { margin: auto 8px auto 0; } + .icon-end { margin: auto 0 auto 8px; order: 1; diff --git a/src/components/button/button.tsx b/src/components/button/button.tsx index 977a718..b044813 100644 --- a/src/components/button/button.tsx +++ b/src/components/button/button.tsx @@ -55,8 +55,6 @@ export const Button: FC = forwardRef( [`width-${adjustWidthOn}`]: adjustWidthOn, }); - const buttonIcon = variant === 'text' && icon; - return (