From fe0858fa491c58ddb019e3d63322540cf06e67b4 Mon Sep 17 00:00:00 2001 From: Arpit Date: Fri, 14 Oct 2022 13:31:22 +0530 Subject: [PATCH] [Chore] widget fixes (#4411) * fixes: button bg color * fixes: loader color * container default bg color * listview bg color * fixes darkmode fro text widget * default color for star rating --- frontend/src/Editor/Components/Text.jsx | 5 +++-- frontend/src/Editor/WidgetManager/widgetConfig.js | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/Editor/Components/Text.jsx b/frontend/src/Editor/Components/Text.jsx index 35c1a70f9b..04196fefd0 100644 --- a/frontend/src/Editor/Components/Text.jsx +++ b/frontend/src/Editor/Components/Text.jsx @@ -21,10 +21,11 @@ export const Text = function Text({ height, properties, styles, darkMode, regist const { loadingState } = properties; const [text, setText] = useState(() => computeText()); const [visibility, setVisibility] = useState(styles.visibility); - const color = textColor === '#000' ? (darkMode ? '#fff' : '#000') : textColor; + const color = ['#000', '#000000'].includes(textColor) ? (darkMode ? '#fff' : '#000') : textColor; useEffect(() => { - visibility !== styles.visibility && setVisibility(styles.visibility); + if (visibility !== styles.visibility) setVisibility(styles.visibility); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [styles.visibility]); // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/frontend/src/Editor/WidgetManager/widgetConfig.js b/frontend/src/Editor/WidgetManager/widgetConfig.js index d5180e6c83..6234506bc2 100644 --- a/frontend/src/Editor/WidgetManager/widgetConfig.js +++ b/frontend/src/Editor/WidgetManager/widgetConfig.js @@ -554,9 +554,9 @@ export const widgets = [ }, events: [], styles: { - backgroundColor: { value: '' }, + backgroundColor: { value: '#375FCF' }, textColor: { value: '#fff' }, - loaderColor: { value: '' }, + loaderColor: { value: '#fff' }, visibility: { value: '{{true}}' }, borderRadius: { value: '{{0}}' }, borderColor: { value: '#375FCF' }, @@ -2129,7 +2129,7 @@ export const widgets = [ }, events: [], styles: { - backgroundColor: { value: '' }, + backgroundColor: { value: '#fff' }, borderRadius: { value: '0' }, borderColor: { value: '#fff' }, visibility: { value: '{{true}}' }, @@ -2755,7 +2755,7 @@ export const widgets = [ }, events: [], styles: { - textColor: { value: '' }, + textColor: { value: '#ffb400' }, labelColor: { value: '' }, visibility: { value: '{{true}}' }, disabledState: { value: '{{false}}' }, @@ -3634,7 +3634,7 @@ export const widgets = [ }, events: [], styles: { - backgroundColor: { value: '' }, + backgroundColor: { value: '#fff' }, borderColor: { value: '#dadcde' }, visibility: { value: '{{true}}' }, disabledState: { value: '{{false}}' },