@@ -52,10 +52,7 @@ const ToggleTmpComp = (function () {
52
52
value : booleanExposingStateControl ( "value" ) ,
53
53
showText : withDefault ( BoolControl , true ) ,
54
54
trueText : withDefault ( StringControl , trans ( "toggleButton.trueDefaultText" ) ) ,
55
- falseText : withDefault (
56
- StringControl ,
57
- trans ( "toggleButton.falseDefaultText" )
58
- ) ,
55
+ falseText : withDefault ( StringControl , trans ( "toggleButton.falseDefaultText" ) ) ,
59
56
onEvent : ChangeEventHandlerControl ,
60
57
disabled : BoolCodeControl ,
61
58
loading : BoolCodeControl ,
@@ -90,11 +87,7 @@ const ToggleTmpComp = (function () {
90
87
} }
91
88
>
92
89
{ props . iconPosition === "right" && text }
93
- {
94
- < IconWrapper >
95
- { props . value . value ? props . trueIcon : props . falseIcon }
96
- </ IconWrapper >
97
- }
90
+ { < IconWrapper > { props . value . value ? props . trueIcon : props . falseIcon } </ IconWrapper > }
98
91
{ props . iconPosition === "left" && text }
99
92
</ Button100 >
100
93
</ ButtonCompWrapperStyled >
@@ -109,33 +102,21 @@ const ToggleTmpComp = (function () {
109
102
} ) }
110
103
</ Section >
111
104
112
- { ( useContext ( EditorContext ) . editorModeStatus === "logic" ||
113
- useContext ( EditorContext ) . editorModeStatus === "both" ) && (
114
- < >
115
- < Section name = { sectionNames . interaction } >
105
+ { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
106
+ < > < Section name = { sectionNames . interaction } >
116
107
{ children . onEvent . getPropertyView ( ) }
117
108
{ disabledPropertyView ( children ) }
118
109
{ hiddenPropertyView ( children ) }
119
110
{ loadingPropertyView ( children ) }
120
111
</ Section >
121
112
< Section name = { sectionNames . advanced } >
122
- { children . showText . propertyView ( {
123
- label : trans ( "toggleButton.showText" ) ,
124
- } ) }
125
- { children . showText . getView ( ) &&
126
- children . trueText . propertyView ( {
127
- label : trans ( "toggleButton.trueLabel" ) ,
128
- } ) }
113
+ { children . showText . propertyView ( { label : trans ( "toggleButton.showText" ) } ) }
114
+ { children . showText . getView ( ) &&
115
+ children . trueText . propertyView ( { label : trans ( "toggleButton.trueLabel" ) } ) }
129
116
{ children . showText . getView ( ) &&
130
- children . falseText . propertyView ( {
131
- label : trans ( "toggleButton.falseLabel" ) ,
132
- } ) }
133
- { children . trueIcon . propertyView ( {
134
- label : trans ( "toggleButton.trueIconLabel" ) ,
135
- } ) }
136
- { children . falseIcon . propertyView ( {
137
- label : trans ( "toggleButton.falseIconLabel" ) ,
138
- } ) }
117
+ children . falseText . propertyView ( { label : trans ( "toggleButton.falseLabel" ) } ) }
118
+ { children . trueIcon . propertyView ( { label : trans ( "toggleButton.trueIconLabel" ) } ) }
119
+ { children . falseIcon . propertyView ( { label : trans ( "toggleButton.falseIconLabel" ) } ) }
139
120
{ children . showText . getView ( ) &&
140
121
children . iconPosition . propertyView ( {
141
122
label : trans ( "toggleButton.iconPosition" ) ,
@@ -144,7 +125,7 @@ const ToggleTmpComp = (function () {
144
125
{ children . alignment . propertyView ( {
145
126
label : trans ( "toggleButton.alignment" ) ,
146
127
radioButton : true ,
147
- } ) }
128
+ } ) }
148
129
</ Section >
149
130
</ >
150
131
) }
0 commit comments