@@ -82,13 +82,17 @@ const ToggleTmpComp = (function () {
82
82
loading = { props . loading }
83
83
disabled = { props . disabled }
84
84
onClick = { ( ) => {
85
- props . onEvent ( " change" ) ;
85
+ props . onEvent ( ' change' ) ;
86
86
props . value . onChange ( ! props . value . value ) ;
87
87
} }
88
88
>
89
- { props . iconPosition === "right" && text }
90
- { < IconWrapper > { props . value . value ? props . trueIcon : props . falseIcon } </ IconWrapper > }
91
- { props . iconPosition === "left" && text }
89
+ { props . iconPosition === 'right' && text }
90
+ {
91
+ < IconWrapper >
92
+ { props . value . value ? props . trueIcon : props . falseIcon }
93
+ </ IconWrapper >
94
+ }
95
+ { props . iconPosition === 'left' && text }
92
96
</ Button100 >
93
97
</ ButtonCompWrapperStyled >
94
98
) ;
@@ -97,53 +101,66 @@ const ToggleTmpComp = (function () {
97
101
< >
98
102
< Section name = { sectionNames . basic } >
99
103
{ children . value . propertyView ( {
100
- label : trans ( " prop.defaultValue" ) ,
101
- tooltip : trans ( " toggleButton.valueDesc" ) ,
104
+ label : trans ( ' prop.defaultValue' ) ,
105
+ tooltip : trans ( ' toggleButton.valueDesc' ) ,
102
106
} ) }
103
107
</ Section >
104
108
105
- { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
106
- < > < Section name = { sectionNames . interaction } >
109
+ { ( useContext ( EditorContext ) . editorModeStatus === 'logic' ||
110
+ useContext ( EditorContext ) . editorModeStatus === 'both' ) && (
111
+ < >
112
+ < Section name = { sectionNames . interaction } >
107
113
{ children . onEvent . getPropertyView ( ) }
108
114
{ disabledPropertyView ( children ) }
109
115
{ hiddenPropertyView ( children ) }
110
116
{ loadingPropertyView ( children ) }
111
117
</ Section >
112
118
< Section name = { sectionNames . advanced } >
113
- { children . showText . propertyView ( { label : trans ( "toggleButton.showText" ) } ) }
114
- { children . showText . getView ( ) &&
115
- children . trueText . propertyView ( { label : trans ( "toggleButton.trueLabel" ) } ) }
119
+ { children . showText . propertyView ( {
120
+ label : trans ( 'toggleButton .showText' ) ,
121
+ } ) }
116
122
{ children . showText . getView ( ) &&
117
- children . falseText . propertyView ( { label : trans ( "toggleButton.falseLabel" ) } ) }
118
- { children . trueIcon . propertyView ( { label : trans ( "toggleButton.trueIconLabel" ) } ) }
119
- { children . falseIcon . propertyView ( { label : trans ( "toggleButton.falseIconLabel" ) } ) }
123
+ children . trueText . propertyView ( {
124
+ label : trans ( 'toggleButton.trueLabel' ) ,
125
+ } ) }
126
+ { children . showText . getView ( ) &&
127
+ children . falseText . propertyView ( {
128
+ label : trans ( 'toggleButton.falseLabel' ) ,
129
+ } ) }
130
+ { children . trueIcon . propertyView ( {
131
+ label : trans ( 'toggleButton.trueIconLabel' ) ,
132
+ } ) }
133
+ { children . falseIcon . propertyView ( {
134
+ label : trans ( 'toggleButton.falseIconLabel' ) ,
135
+ } ) }
120
136
{ children . showText . getView ( ) &&
121
137
children . iconPosition . propertyView ( {
122
- label : trans ( " toggleButton.iconPosition" ) ,
138
+ label : trans ( ' toggleButton.iconPosition' ) ,
123
139
radioButton : true ,
124
- } ) }
140
+ } ) }
125
141
{ children . alignment . propertyView ( {
126
- label : trans ( " toggleButton.alignment" ) ,
142
+ label : trans ( ' toggleButton.alignment' ) ,
127
143
radioButton : true ,
128
144
} ) }
129
145
</ Section >
130
146
</ >
131
147
) }
132
148
133
- { ( useContext ( EditorContext ) . editorModeStatus === " layout" ||
134
- useContext ( EditorContext ) . editorModeStatus === " both" ) && (
149
+ { ( useContext ( EditorContext ) . editorModeStatus === ' layout' ||
150
+ useContext ( EditorContext ) . editorModeStatus === ' both' ) && (
135
151
< >
136
152
< Section name = { sectionNames . style } >
137
153
{ children . showBorder . propertyView ( {
138
- label : trans ( " toggleButton.showBorder" ) ,
154
+ label : trans ( ' toggleButton.showBorder' ) ,
139
155
} ) }
140
156
{ children . style . getPropertyView ( ) }
141
157
</ Section >
142
158
< Section name = { sectionNames . animationStyle } >
143
159
{ children . animationStyle . getPropertyView ( ) }
144
160
</ Section >
145
161
</ >
146
- ) }
162
+ ) }
163
+
147
164
</ >
148
165
) )
149
166
. setExposeMethodConfigs ( buttonRefMethods )
0 commit comments