From a986ecc3fc09bba7ef31a6885b5815370e7d1c65 Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Tue, 14 Jun 2022 08:21:56 -0400 Subject: [PATCH] fix alignment based button on action type (#1491) * fix alignment based on action type * moving to CSS modules --- src/components/@shared/ButtonBuy/index.module.css | 5 +++++ src/components/@shared/ButtonBuy/index.tsx | 2 +- src/components/@shared/atoms/Button/index.module.css | 5 ----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/@shared/ButtonBuy/index.module.css b/src/components/@shared/ButtonBuy/index.module.css index 19c711524..b89ee14f8 100644 --- a/src/components/@shared/ButtonBuy/index.module.css +++ b/src/components/@shared/ButtonBuy/index.module.css @@ -3,6 +3,11 @@ margin-top: calc(var(--spacer) / 2); } +.actionsCenter { + margin: auto !important; + display: block; +} + .help { font-size: var(--font-size-mini); color: var(--color-secondary); diff --git a/src/components/@shared/ButtonBuy/index.tsx b/src/components/@shared/ButtonBuy/index.tsx index e2d8f32f4..233a4d7fe 100644 --- a/src/components/@shared/ButtonBuy/index.tsx +++ b/src/components/@shared/ButtonBuy/index.tsx @@ -161,7 +161,7 @@ export default function ButtonBuy({ type={type} onClick={onClick} disabled={disabled} - className="center" + className={action === 'compute' ? styles.actionsCenter : ''} > {buttonText} diff --git a/src/components/@shared/atoms/Button/index.module.css b/src/components/@shared/atoms/Button/index.module.css index da414c160..e187b43cf 100644 --- a/src/components/@shared/atoms/Button/index.module.css +++ b/src/components/@shared/atoms/Button/index.module.css @@ -82,11 +82,6 @@ min-width: auto; } -.center { - margin: auto !important; - display: block; -} - /* Size Modifiers */ .small { font-size: var(--font-size-small);