[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
This commit is contained in:
Arpit 2022-10-14 13:31:22 +05:30 committed by GitHub
parent 8c4072dbb6
commit fe0858fa49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -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

View file

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