mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Remove null check for 'component.definition.styles (#1183)
* Remove null check for 'component.definition.styles * Update Toggle.jsx * Update Toggle.jsx
This commit is contained in:
parent
a7502e5f03
commit
918e8b9304
1 changed files with 3 additions and 3 deletions
|
|
@ -37,9 +37,9 @@ export const ToggleSwitch = ({
|
|||
const toggleSwitchColorProperty = component.definition.styles.toggleSwitchColor;
|
||||
const toggleSwitchColor = toggleSwitchColorProperty ? toggleSwitchColorProperty.value : '#3c92dc';
|
||||
const textColor = textColorProperty ? textColorProperty.value : '#000';
|
||||
const widgetVisibility = component.definition.styles?.visibility?.value ?? true;
|
||||
const disabledState = component.definition.styles?.disabledState?.value ?? false;
|
||||
|
||||
const widgetVisibility = component.definition.styles.visibility?.value ?? true;
|
||||
const disabledState = component.definition.styles.disabledState?.value ?? false;
|
||||
|
||||
const parsedDisabledState =
|
||||
typeof disabledState !== 'boolean' ? resolveWidgetFieldValue(disabledState, currentState) : disabledState;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue