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}}' },