fix secondary text color update with secondary sign display (#5124)

* fix secondary text color update with secondary sign display

* Fixes lint errors

Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com>
This commit is contained in:
Han Ye Htun 2023-01-03 10:04:26 +06:30 committed by GitHub
parent 2fb7352ee8
commit 44db9e7952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,6 +128,13 @@ export const Inspector = ({
if (param.type === 'select' && defaultValue) {
allParams[defaultValue.paramName]['value'] = defaultValue.value;
}
if (param.name === 'secondarySignDisplay') {
if (value === 'negative') {
newDefinition['styles']['secondaryTextColour']['value'] = '#EE2C4D';
} else if (value === 'positive') {
newDefinition['styles']['secondaryTextColour']['value'] = '#36AF8B';
}
}
} else {
allParams[param.name] = value;
}