Skip to content

Commit 673e576

Browse files
committed
Made some UI changes
1 parent d98e34f commit 673e576

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

control-station/src/components/SensorBoxes/Sensors/SensorBox.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
margin-top: 1%;
66
margin-bottom: 1%;
77
background: #e0e0e0;
8+
position: relative;
89
}
910
.SensorContainer {
1011
width: 65vw;
@@ -20,6 +21,7 @@
2021
display: flex;
2122
justify-content: center;
2223
align-items: center;
23-
height: 90%;
24+
height: auto;
2425
font-size: 3rem;
26+
position: relative;
2527
}

control-station/src/components/SensorBoxes/Sensors/SensorBox.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import "./SensorBox.css";
22

3-
interface Value {
3+
interface SensorBoxProps {
4+
title: string;
45
value: number;
56
}
67

7-
function SensorBox({ value }: Value) {
8+
function SensorBox({ title, value }: SensorBoxProps) {
89
return (
910
<div className="sensorbox">
10-
<h3 style={{ textAlign: "center", height: "10%" }}>Title</h3>
11+
<h3 style={{ textAlign: "center", height: "10%" }}>{title}</h3>
1112
<p className="sensor-value">{value}</p>
1213
</div>
1314
);

control-station/src/components/SensorBoxes/Sensors/SensorsContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ function SensorContainer() {
66
const { podData } = useContext(PodContext);
77
return (
88
<div className="SensorContainer">
9-
<SensorBox value={podData.gyroscope} />
10-
<SensorBox value={podData.wheel_encoder} />
11-
<SensorBox value={podData.downstream_pressure_transducer} />
12-
<SensorBox value={podData.upstream_pressure_transducer} />
9+
<SensorBox title="Speed" value={podData.gyroscope} />
10+
<SensorBox title="Distance" value={podData.wheel_encoder} />
11+
<SensorBox title="PT1" value={podData.downstream_pressure_transducer} />
12+
<SensorBox title="PT2" value={podData.upstream_pressure_transducer} />
1313
</div>
1414
);
1515
}

0 commit comments

Comments
 (0)