Skip to content

Commit 0f4d6c1

Browse files
committed
Format & lint
1 parent d86ae2f commit 0f4d6c1

9 files changed

Lines changed: 30 additions & 30 deletions

File tree

src/view/components/toolbar/InputSlider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class InputSlider extends React.Component<ISliderProps, any, any> {
3232
defaultValue={this.props.minValue.toLocaleString()}
3333
pattern={`^-?[0-9]{0,${
3434
this.props.maxValue.toString().length
35-
}}$`}
35+
}}$`}
3636
onKeyUp={this.handleOnChange}
3737
aria-label={`${this.props.type} sensor input ${this.props.axisLabel}`}
3838
/>

src/view/components/toolbar/SensorModalUtils.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
import * as React from "react";
44
import { SENSOR_LIST } from "../../constants";
55
import { ARROW_RIGHT_SVG } from "../../svgs/arrow_right_svg";
6-
import * as CPX_MODAL from "./cpx/CpxModalContent"
76
import * as CLUE_MODAL from "./clue/ClueModalContent";
7+
import * as CPX_MODAL from "./cpx/CpxModalContent";
88
import * as MICROBIT_MODAL from "./microbit/MicrobitModalContent";
99

10-
1110
export const TRY_IT_MAKE_CODE = (
1211
<div className="link-parent">
1312
<a href="https://makecode.adafruit.com/" className="link">
@@ -112,8 +111,6 @@ export const DEFAULT_MODAL_CONTENT: IModalContent = {
112111
id: "none",
113112
};
114113

115-
116-
117114
export const LABEL_TO_MODAL_CONTENT_CONSTRUCTOR = new Map([
118115
[CPX_TOOLBAR_ICON_ID.GPIO, CPX_MODAL.GPIO_CONTENT],
119116
[CPX_TOOLBAR_ICON_ID.IR, CPX_MODAL.IR_CONTENT],

src/view/components/toolbar/clue/ClueModalContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const TEMPERATURE_CONTENT = (
1212
sensorValues: { [key: string]: number }
1313
): IModalContent => {
1414
const temperatureSensorValues = {
15-
T: sensorValues[SENSOR_LIST.TEMPERATURE]
16-
}
15+
T: sensorValues[SENSOR_LIST.TEMPERATURE],
16+
};
1717
return {
1818
components: [
1919
<GenericSliderComponent

src/view/components/toolbar/clue/ClueSensorProperties.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,4 @@ export const TEMPERATURE_SENSOR_PROPERTIES: ISensorProps = {
196196
LABEL: "Temperature sensor",
197197
sliderProps: [TEMPERATURE_SLIDER_PROPS],
198198
unitLabel: "°C",
199-
};
199+
};

src/view/components/toolbar/cpx/CpxModalContent.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import * as React from "react";
22
import { SENSOR_LIST } from "../../../constants";
3-
import { IModalContent, FEATURE_REQUEST_ON_GITHUB, TRY_IT_MAKE_CODE } from "../SensorModalUtils";
43
import { TAG_INPUT_SVG } from "../../../svgs/tag_input_svg";
54
import { TAG_OUTPUT_SVG } from "../../../svgs/tag_output_svg";
65
import { GenericSliderComponent } from "../GenericSliderComponent";
7-
import * as SENSOR_PROPERTIES from './CpxSensorProperties'
6+
import {
7+
FEATURE_REQUEST_ON_GITHUB,
8+
IModalContent,
9+
TRY_IT_MAKE_CODE,
10+
} from "../SensorModalUtils";
11+
import * as SENSOR_PROPERTIES from "./CpxSensorProperties";
812

913
export const GPIO_CONTENT = (
1014
onUpdateValue: (sensor: SENSOR_LIST, value: number) => void,
@@ -40,8 +44,8 @@ export const LIGHT_CONTENT = (
4044
sensorValues: { [key: string]: number }
4145
): IModalContent => {
4246
const lightSensorValues = {
43-
L: sensorValues[SENSOR_LIST.LIGHT]
44-
}
47+
L: sensorValues[SENSOR_LIST.LIGHT],
48+
};
4549
return {
4650
descriptionTitle: "toolbar-light-sensor.title",
4751
tagInput: TAG_INPUT_SVG,
@@ -174,8 +178,8 @@ export const TEMPERATURE_CONTENT = (
174178
sensorValues: { [key: string]: number }
175179
): IModalContent => {
176180
const temperatureSensorValues = {
177-
T: sensorValues[SENSOR_LIST.TEMPERATURE]
178-
}
181+
T: sensorValues[SENSOR_LIST.TEMPERATURE],
182+
};
179183
return {
180184
components: [
181185
<GenericSliderComponent
@@ -191,4 +195,4 @@ export const TEMPERATURE_CONTENT = (
191195
tagOutput: undefined,
192196
tryItDescription: "toolbar-temperature-sensor.tryItDescription",
193197
};
194-
};
198+
};

src/view/components/toolbar/cpx/CpxSensorProperties.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ISliderProps, ISensorProps } from "../../../viewUtils";
21
import { SENSOR_LIST } from "../../../constants";
2+
import { ISensorProps, ISliderProps } from "../../../viewUtils";
33

44
const LIGHT_SLIDER_PROPS: ISliderProps = {
55
maxValue: 255,
@@ -63,4 +63,4 @@ export const MOTION_SENSOR_PROPERTIES: ISensorProps = {
6363
MOTION_SLIDER_PROPS_Z,
6464
],
6565
unitLabel: "Lux",
66-
};
66+
};

src/view/components/toolbar/microbit/MicrobitModalContent.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import * as React from "react";
22
import { GESTURES_MICROBIT, SENSOR_LIST } from "../../../constants";
33
import { TAG_INPUT_SVG } from "../../../svgs/tag_input_svg";
44
import { TAG_OUTPUT_SVG } from "../../../svgs/tag_output_svg";
5+
import { GenericSliderComponent } from "../GenericSliderComponent";
56
import { Gesture } from "../Gesture";
67
import { FEATURE_REQUEST_ON_GITHUB, IModalContent } from "../SensorModalUtils";
7-
import { GenericSliderComponent } from "../GenericSliderComponent";
8-
import * as SENSOR_PROPERTIES from './MicrobitSensorProperties'
8+
import * as SENSOR_PROPERTIES from "./MicrobitSensorProperties";
99

1010
export const ACCELEROMETER_CONTENT = (
1111
onUpdateValue: (sensor: SENSOR_LIST, value: number) => void,
@@ -143,8 +143,8 @@ export const LIGHT_CONTENT = (
143143
sensorValues: { [key: string]: number }
144144
): IModalContent => {
145145
const lightSensorValues = {
146-
L: sensorValues[SENSOR_LIST.LIGHT]
147-
}
146+
L: sensorValues[SENSOR_LIST.LIGHT],
147+
};
148148
return {
149149
descriptionTitle: "toolbar-light-sensor.title",
150150
tagInput: TAG_INPUT_SVG,
@@ -167,8 +167,8 @@ export const TEMPERATURE_CONTENT = (
167167
sensorValues: { [key: string]: number }
168168
): IModalContent => {
169169
const temperatureSensorValues = {
170-
T: sensorValues[SENSOR_LIST.TEMPERATURE]
171-
}
170+
T: sensorValues[SENSOR_LIST.TEMPERATURE],
171+
};
172172
return {
173173
components: [
174174
<GenericSliderComponent

src/view/components/toolbar/microbit/MicrobitSensorProperties.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ISliderProps, ISensorProps } from "../../../viewUtils";
21
import { SENSOR_LIST } from "../../../constants";
2+
import { ISensorProps, ISliderProps } from "../../../viewUtils";
33

44
const LIGHT_SLIDER_PROPS: ISliderProps = {
55
maxValue: 255,
@@ -10,7 +10,6 @@ const LIGHT_SLIDER_PROPS: ISliderProps = {
1010
axisLabel: "L",
1111
};
1212

13-
1413
export const LIGHT_SENSOR_PROPERTIES: ISensorProps = {
1514
LABEL: "Light sensor",
1615
sliderProps: [LIGHT_SLIDER_PROPS],
@@ -67,4 +66,4 @@ export const TEMPERATURE_SENSOR_PROPERTIES: ISensorProps = {
6766
LABEL: "Temperature sensor",
6867
sliderProps: [TEMPERATURE_SLIDER_PROPS],
6968
unitLabel: "°C",
70-
};
69+
};

src/view/styles/ToolBar.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@
174174
flex-direction: "column";
175175
align-items: "center";
176176
height: 750;
177-
padding-top:10px;
177+
padding-top: 10px;
178178
}
179179

180-
.generic-slider-component{
181-
padding-top:10px;
182-
}
180+
.generic-slider-component {
181+
padding-top: 10px;
182+
}

0 commit comments

Comments
 (0)