Skip to content

Commit 410df7a

Browse files
committed
formating removed-14
1 parent ff44754 commit 410df7a

File tree

1 file changed

+11
-30
lines changed

1 file changed

+11
-30
lines changed

client/packages/lowcoder/src/comps/comps/buttonComp/toggleButtonComp.tsx

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ const ToggleTmpComp = (function () {
5252
value: booleanExposingStateControl("value"),
5353
showText: withDefault(BoolControl, true),
5454
trueText: withDefault(StringControl, trans("toggleButton.trueDefaultText")),
55-
falseText: withDefault(
56-
StringControl,
57-
trans("toggleButton.falseDefaultText")
58-
),
55+
falseText: withDefault(StringControl, trans("toggleButton.falseDefaultText")),
5956
onEvent: ChangeEventHandlerControl,
6057
disabled: BoolCodeControl,
6158
loading: BoolCodeControl,
@@ -90,11 +87,7 @@ const ToggleTmpComp = (function () {
9087
}}
9188
>
9289
{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>}
9891
{props.iconPosition === "left" && text}
9992
</Button100>
10093
</ButtonCompWrapperStyled>
@@ -109,33 +102,21 @@ const ToggleTmpComp = (function () {
109102
})}
110103
</Section>
111104

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}>
116107
{children.onEvent.getPropertyView()}
117108
{disabledPropertyView(children)}
118109
{hiddenPropertyView(children)}
119110
{loadingPropertyView(children)}
120111
</Section>
121112
<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") })}
129116
{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") })}
139120
{children.showText.getView() &&
140121
children.iconPosition.propertyView({
141122
label: trans("toggleButton.iconPosition"),
@@ -144,7 +125,7 @@ const ToggleTmpComp = (function () {
144125
{children.alignment.propertyView({
145126
label: trans("toggleButton.alignment"),
146127
radioButton: true,
147-
})}
128+
})}
148129
</Section>
149130
</>
150131
)}

0 commit comments

Comments
 (0)