File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
control-station/src/components/SensorBoxes/Sensors Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 5
5
margin-top : 1% ;
6
6
margin-bottom : 1% ;
7
7
background : # e0e0e0 ;
8
+ position : relative;
8
9
}
9
10
.SensorContainer {
10
11
width : 65vw ;
20
21
display : flex;
21
22
justify-content : center;
22
23
align-items : center;
23
- height : 90 % ;
24
+ height : auto ;
24
25
font-size : 3rem ;
26
+ position : relative;
25
27
}
Original file line number Diff line number Diff line change 1
1
import "./SensorBox.css" ;
2
2
3
- interface Value {
3
+ interface SensorBoxProps {
4
+ title : string ;
4
5
value : number ;
5
6
}
6
7
7
- function SensorBox ( { value } : Value ) {
8
+ function SensorBox ( { title , value } : SensorBoxProps ) {
8
9
return (
9
10
< div className = "sensorbox" >
10
- < h3 style = { { textAlign : "center" , height : "10%" } } > Title </ h3 >
11
+ < h3 style = { { textAlign : "center" , height : "10%" } } > { title } </ h3 >
11
12
< p className = "sensor-value" > { value } </ p >
12
13
</ div >
13
14
) ;
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ function SensorContainer() {
6
6
const { podData } = useContext ( PodContext ) ;
7
7
return (
8
8
< 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 } />
13
13
</ div >
14
14
) ;
15
15
}
You can’t perform that action at this time.
0 commit comments