From af61f4f1db3640c8d31ef11b0b5d09d442669615 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Mon, 10 Jan 2022 20:33:40 +0530 Subject: [PATCH] Refactor SettingTile component Signed-off-by: Ajay Bura --- src/app/molecules/setting-tile/SettingTile.jsx | 6 +++--- src/app/molecules/setting-tile/SettingTile.scss | 14 ++++++++------ src/app/organisms/settings/Settings.scss | 3 --- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/app/molecules/setting-tile/SettingTile.jsx b/src/app/molecules/setting-tile/SettingTile.jsx index 2792e02..15ab538 100644 --- a/src/app/molecules/setting-tile/SettingTile.jsx +++ b/src/app/molecules/setting-tile/SettingTile.jsx @@ -7,13 +7,13 @@ import Text from '../../atoms/text/Text'; function SettingTile({ title, options, content }) { return (
-
+
{title}
- {options !== null &&
{options}
} + {content}
- {content !== null &&
{content}
} + {options !== null &&
{options}
}
); } diff --git a/src/app/molecules/setting-tile/SettingTile.scss b/src/app/molecules/setting-tile/SettingTile.scss index ab21fb6..322f001 100644 --- a/src/app/molecules/setting-tile/SettingTile.scss +++ b/src/app/molecules/setting-tile/SettingTile.scss @@ -1,13 +1,15 @@ @use '../../partials/dir'; .setting-tile { - &__title__wrapper { - display: flex; - align-items: center; - } - &__title { + display: flex; + &__content { flex: 1; min-width: 0; - @include dir.side(margin, 0, var(--sp-normal)); + } + &__title { + margin-bottom: var(--sp-ultra-tight); + } + &__options { + @include dir.side(margin, var(--sp-tight), 0); } } \ No newline at end of file diff --git a/src/app/organisms/settings/Settings.scss b/src/app/organisms/settings/Settings.scss index c3ec157..9b42c66 100644 --- a/src/app/organisms/settings/Settings.scss +++ b/src/app/organisms/settings/Settings.scss @@ -23,9 +23,6 @@ margin-top: var(--sp-normal); border-bottom: 1px solid var(--bg-surface-border); padding-bottom: 16px; - &__title__wrapper { - margin-bottom: var(--sp-ultra-tight); - } } }