From bd17b1cb8093219cfdc705668349833ff6b8159b Mon Sep 17 00:00:00 2001 From: Aminejvm Date: Wed, 31 Mar 2021 20:00:12 +0100 Subject: [PATCH] updated content --- .../core/FontFrame/Settings/Controls.js | 16 +++-- .../core/FontFrame/Settings/FixedControls.js | 7 ++- components/core/FontFrame/Settings/Select.js | 7 ++- components/core/FontFrame/Settings/index.js | 23 ++++++- components/core/FontFrame/Views/Glyphs.js | 2 +- components/core/FontFrame/Views/Paragraph.js | 63 ++++++++++--------- components/core/FontFrame/Views/Sentence.js | 10 ++- components/core/FontFrame/Views/content.js | 25 ++++++++ components/core/FontFrame/Views/index.js | 14 +---- components/core/FontFrame/hooks.js | 31 ++++++--- components/core/FontFrame/index.js | 6 +- 11 files changed, 136 insertions(+), 68 deletions(-) create mode 100644 components/core/FontFrame/Views/content.js diff --git a/components/core/FontFrame/Settings/Controls.js b/components/core/FontFrame/Settings/Controls.js index 413e750a..f063e803 100644 --- a/components/core/FontFrame/Settings/Controls.js +++ b/components/core/FontFrame/Settings/Controls.js @@ -19,6 +19,8 @@ export const Controller = ({ options, onChange, selectSuffix = "", + //NOTE(Amine): minWidth will remove junk when Select value change + selectMinWidth, label, min, max, @@ -42,6 +44,7 @@ export const Controller = ({ value={value} onChange={onChange} placeholderSuffix={selectSuffix} + minWidth={selectMinWidth} />
css` +const STYLES_SETTINGS_WRAPPER = (theme) => css` box-sizing: border-box; display: flex; border-radius: 4px; @@ -236,11 +239,16 @@ const STYLES_FEELING_LUCKY = (theme) => css` } `; +const STYLES_FEELING_LUCKY = css` + width: 100%; + text-align: left; +`; + export const SettingsControl = ({ getRandomLayout, resetLayout }) => (

Settings

-
-
diff --git a/components/core/FontFrame/Settings/FixedControls.js b/components/core/FontFrame/Settings/FixedControls.js index deae8560..eea6f8b0 100644 --- a/components/core/FontFrame/Settings/FixedControls.js +++ b/components/core/FontFrame/Settings/FixedControls.js @@ -16,6 +16,9 @@ const CONTROLS_STYLES_WRAPPER = (theme) => css` path { stroke: ${theme.fontPreviewDarkMode ? theme.system.white : theme.system.black}; } + svg { + display: block; + } `; const CONTROLS_DARKMODE_WRAPPER = (theme) => css` @@ -34,9 +37,7 @@ const CONTROLS_DARKMODE_WRAPPER = (theme) => css` button:focus { outline: none; } - svg { - display: block; - } + .lightmode_btn { path { stroke: ${theme.fontPreviewDarkMode ? theme.system.gray50 : theme.system.black}; diff --git a/components/core/FontFrame/Settings/Select.js b/components/core/FontFrame/Settings/Select.js index 3de90837..c350a3a7 100644 --- a/components/core/FontFrame/Settings/Select.js +++ b/components/core/FontFrame/Settings/Select.js @@ -9,15 +9,16 @@ export default function Select({ value, placeholderSuffix = "", inputStyle, + minWidth = "none", ...props }) { const label = - options.find((option) => option.value === value)?.name || `${value} ${placeholderSuffix}`; + options.find((option) => option.value === value)?.name || `${value}${placeholderSuffix}`; return (
{label}

- +