From 66464c22ebfe4ed7f3fe72684846e79baa05bb08 Mon Sep 17 00:00:00 2001 From: kKaskak <117831817+kKaskak@users.noreply.github.com> Date: Mon, 25 Dec 2023 17:13:53 +0200 Subject: [PATCH] feature: conditional class & font-size changes --- src/common/ModalDialog/ModalDialog.js | 2 +- src/common/ModalDialog/styles.less | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/common/ModalDialog/ModalDialog.js b/src/common/ModalDialog/ModalDialog.js index e7e2e8056..12513df1b 100644 --- a/src/common/ModalDialog/ModalDialog.js +++ b/src/common/ModalDialog/ModalDialog.js @@ -84,7 +84,7 @@ const ModalDialog = ({ className, title, buttons, children, dataset, onCloseRequ } { typeof label === 'string' && label.length > 0 ? -
{label}
+
2 ? styles['small-label'] : styles['label'])}>{label}
: null } diff --git a/src/common/ModalDialog/styles.less b/src/common/ModalDialog/styles.less index c7f136a5b..5dbec9033 100644 --- a/src/common/ModalDialog/styles.less +++ b/src/common/ModalDialog/styles.less @@ -84,6 +84,7 @@ } } } + .action-button { flex: 1; display: flex; @@ -116,7 +117,7 @@ color: var(--primary-foreground-color); } - .label { + .label, .small-label { flex-grow: 0; flex-shrink: 1; flex-basis: auto; @@ -126,7 +127,6 @@ text-align: center; color: var(--primary-foreground-color); } - } @media only screen and (max-width: @minimum) { @@ -139,4 +139,11 @@ padding: 0 1.5rem; } } + + .action-button { + .small-label { + font-size: 0.688rem; + font-weight: 600; + } + } } \ No newline at end of file