Skip to content

Commit 8c092dd

Browse files
committed
formating removed-12
1 parent fd696d3 commit 8c092dd

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed
Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
import {BoolCodeControl, StringControl} from 'comps/controls/codeControl';
2-
import {withDefault} from 'comps/generators';
3-
import {UICompBuilder} from 'comps/generators/uiCompBuilder';
1+
import {BoolCodeControl, StringControl} from "comps/controls/codeControl";
2+
import {withDefault} from "comps/generators";
3+
import {UICompBuilder} from "comps/generators/uiCompBuilder";
44
import {
55
disabledPropertyView,
66
hiddenPropertyView,
77
loadingPropertyView,
8-
} from 'comps/utils/propertyUtils';
9-
import {Section, sectionNames} from 'lowcoder-design';
10-
import {trans} from 'i18n';
11-
import styled from 'styled-components';
12-
import {ChangeEventHandlerControl} from '../../controls/eventHandlerControl';
8+
} from "comps/utils/propertyUtils";
9+
import {Section, sectionNames} from "lowcoder-design";
10+
import {trans} from "i18n";
11+
import styled from "styled-components";
12+
import {ChangeEventHandlerControl} from "../../controls/eventHandlerControl";
1313
import {
1414
CommonNameConfig,
1515
NameConfig,
1616
withExposingConfigs,
17-
} from '../../generators/withExposing';
17+
} from "../../generators/withExposing";
1818
import {
1919
Button100,
2020
ButtonCompWrapper,
2121
buttonRefMethods,
22-
} from './buttonCompConstants';
23-
import {IconControl} from 'comps/controls/iconControl';
22+
} from "./buttonCompConstants";
23+
import {IconControl} from "comps/controls/iconControl";
2424
import {
2525
AlignWithStretchControl,
2626
LeftRightControl,
27-
} from 'comps/controls/dropdownControl';
28-
import {booleanExposingStateControl} from 'comps/controls/codeStateControl';
27+
} from "comps/controls/dropdownControl";
28+
import {booleanExposingStateControl} from "comps/controls/codeStateControl";
2929
import {
3030
AnimationStyle,
3131
AnimationStyleType,
3232
ToggleButtonStyle,
33-
} from 'comps/controls/styleControlConstants';
34-
import {styleControl} from 'comps/controls/styleControl';
35-
import {BoolControl} from 'comps/controls/boolControl';
36-
import {RefControl} from 'comps/controls/refControl';
37-
import React, {useContext} from 'react';
38-
import {EditorContext} from 'comps/editorState';
33+
} from "comps/controls/styleControlConstants";
34+
import {styleControl} from "comps/controls/styleControl";
35+
import {BoolControl} from "comps/controls/boolControl";
36+
import {RefControl} from "comps/controls/refControl";
37+
import React, {useContext} from "react";
38+
import {EditorContext} from "comps/editorState";
3939

4040
const IconWrapper = styled.div`
4141
display: flex;
4242
`;
4343

4444
const ButtonCompWrapperStyled = styled(ButtonCompWrapper)<{
45-
$align: 'left' | 'center' | 'right' | 'stretch';
45+
$align: "left" | "center" | "right" | "stretch";
4646
$showBorder: boolean;
4747
$animationStyle: AnimationStyleType;
4848
}>`
@@ -52,26 +52,26 @@ const ButtonCompWrapperStyled = styled(ButtonCompWrapper)<{
5252
justify-content: ${(props) => props.$align};
5353
5454
> button {
55-
width: ${(props) => props.$align !== 'stretch' && 'auto'};
56-
border: ${(props) => !props.$showBorder && 'none'};
57-
box-shadow: ${(props) => !props.$showBorder && 'none'};
55+
width: ${(props) => props.$align !== "stretch" && "auto"};
56+
border: ${(props) => !props.$showBorder && "none"};
57+
box-shadow: ${(props) => !props.$showBorder && "none"};
5858
}
5959
`;
6060

6161
const ToggleTmpComp = (function () {
6262
const childrenMap = {
63-
value: booleanExposingStateControl('value'),
63+
value: booleanExposingStateControl("value"),
6464
showText: withDefault(BoolControl, true),
65-
trueText: withDefault(StringControl, trans('toggleButton.trueDefaultText')),
65+
trueText: withDefault(StringControl, trans("toggleButton.trueDefaultText")),
6666
falseText: withDefault(
6767
StringControl,
68-
trans('toggleButton.falseDefaultText')
68+
trans("toggleButton.falseDefaultText")
6969
),
7070
onEvent: ChangeEventHandlerControl,
7171
disabled: BoolCodeControl,
7272
loading: BoolCodeControl,
73-
trueIcon: withDefault(IconControl, '/icon:solid/AngleUp'),
74-
falseIcon: withDefault(IconControl, '/icon:solid/AngleDown'),
73+
trueIcon: withDefault(IconControl, "/icon:solid/AngleUp"),
74+
falseIcon: withDefault(IconControl, "/icon:solid/AngleDown"),
7575
iconPosition: LeftRightControl,
7676
alignment: AlignWithStretchControl,
7777
style: styleControl(ToggleButtonStyle),
@@ -96,17 +96,17 @@ const ToggleTmpComp = (function () {
9696
loading={props.loading}
9797
disabled={props.disabled}
9898
onClick={() => {
99-
props.onEvent('change');
99+
props.onEvent("change");
100100
props.value.onChange(!props.value.value);
101101
}}
102102
>
103-
{props.iconPosition === 'right' && text}
103+
{props.iconPosition === "right" && text}
104104
{
105105
<IconWrapper>
106106
{props.value.value ? props.trueIcon : props.falseIcon}
107107
</IconWrapper>
108108
}
109-
{props.iconPosition === 'left' && text}
109+
{props.iconPosition === "left" && text}
110110
</Button100>
111111
</ButtonCompWrapperStyled>
112112
);
@@ -115,13 +115,13 @@ const ToggleTmpComp = (function () {
115115
<>
116116
<Section name={sectionNames.basic}>
117117
{children.value.propertyView({
118-
label: trans('prop.defaultValue'),
119-
tooltip: trans('toggleButton.valueDesc'),
118+
label: trans("prop.defaultValue"),
119+
tooltip: trans("toggleButton.valueDesc"),
120120
})}
121121
</Section>
122122

123-
{(useContext(EditorContext).editorModeStatus === 'logic' ||
124-
useContext(EditorContext).editorModeStatus === 'both') && (
123+
{(useContext(EditorContext).editorModeStatus === "logic" ||
124+
useContext(EditorContext).editorModeStatus === "both") && (
125125
<>
126126
<Section name={sectionNames.interaction}>
127127
{children.onEvent.getPropertyView()}
@@ -131,41 +131,41 @@ const ToggleTmpComp = (function () {
131131
</Section>
132132
<Section name={sectionNames.advanced}>
133133
{children.showText.propertyView({
134-
label: trans('toggleButton.showText'),
134+
label: trans("toggleButton.showText"),
135135
})}
136136
{children.showText.getView() &&
137137
children.trueText.propertyView({
138-
label: trans('toggleButton.trueLabel'),
138+
label: trans("toggleButton.trueLabel"),
139139
})}
140140
{children.showText.getView() &&
141141
children.falseText.propertyView({
142-
label: trans('toggleButton.falseLabel'),
142+
label: trans("toggleButton.falseLabel"),
143143
})}
144144
{children.trueIcon.propertyView({
145-
label: trans('toggleButton.trueIconLabel'),
145+
label: trans("toggleButton.trueIconLabel"),
146146
})}
147147
{children.falseIcon.propertyView({
148-
label: trans('toggleButton.falseIconLabel'),
148+
label: trans("toggleButton.falseIconLabel"),
149149
})}
150150
{children.showText.getView() &&
151151
children.iconPosition.propertyView({
152-
label: trans('toggleButton.iconPosition'),
152+
label: trans("toggleButton.iconPosition"),
153153
radioButton: true,
154154
})}
155155
{children.alignment.propertyView({
156-
label: trans('toggleButton.alignment'),
156+
label: trans("toggleButton.alignment"),
157157
radioButton: true,
158158
})}
159159
</Section>
160160
</>
161161
)}
162162

163-
{(useContext(EditorContext).editorModeStatus === 'layout' ||
164-
useContext(EditorContext).editorModeStatus === 'both') && (
163+
{(useContext(EditorContext).editorModeStatus === "layout" ||
164+
useContext(EditorContext).editorModeStatus === "both") && (
165165
<>
166166
<Section name={sectionNames.style}>
167167
{children.showBorder.propertyView({
168-
label: trans('toggleButton.showBorder'),
168+
label: trans("toggleButton.showBorder"),
169169
})}
170170
{children.style.getPropertyView()}
171171
</Section>
@@ -181,7 +181,7 @@ const ToggleTmpComp = (function () {
181181
})();
182182

183183
export const ToggleButtonComp = withExposingConfigs(ToggleTmpComp, [
184-
new NameConfig('value', trans('dropdown.textDesc')),
185-
new NameConfig('loading', trans('button.loadingDesc')),
184+
new NameConfig("value", trans("dropdown.textDesc")),
185+
new NameConfig("loading", trans("button.loadingDesc")),
186186
...CommonNameConfig,
187187
]);

0 commit comments

Comments
 (0)