Arrange wind controls horizontally

This commit is contained in:
b0txec
2026-08-19 17:34:04 +03:00
parent 59132179ef
commit 632f377c2d
3 changed files with 21 additions and 16 deletions
+4 -4
View File
@@ -107,17 +107,17 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
<div class="mapControlSections">
<section class="valueControls">
<strong>Value and wind settings</strong>
<div>
<label>
<div class="windControlRow">
<label class="roundControl">
<input
type="checkbox"
checked={windSignals.roundValues[0]()}
onChange={e => windSignals.roundValues[1](e.target.checked)}
/>
Round values
<span>Round temperatures</span>
</label>
{ props.showWind && <WindInputs signals={windSignals} /> }
</div>
{ props.showWind && <WindInputs signals={windSignals} /> }
</section>
{mode === "faktiska" && <IconInputs cities={data().map(([city]) => city)} weatherIconsSignal={weatherIconsSignal} />}
</div>
+16 -11
View File
@@ -12,32 +12,37 @@ export const WindInputs: Component<{signals: WindSignals}> = (
direction: [getDirection, setDirection],
speed: [getSpeed, setSpeed],
gusts: [getGusts, setGusts],
roundValues: [getRoundValues, setRoundValues],
}}
) => {
return (
<>
<div>
<label class="windField">
<span>Wind direction</span>
<input
type="text"
value={getDirection()}
placeholder="e.g. ZA"
onInput={e => setDirection(e.target.value)}
/>
Wind direction
</div>
<div>
</label>
<label class="windField">
<span>Wind speed</span>
<input
type="text"
value={getSpeed()}
placeholder="e.g. 26"
onInput={e => setSpeed(e.target.value)}
/>
Wind speed
</div>
<div>
</label>
<label class="windField">
<span>Gusts</span>
<input
type="text"
value={getGusts()}
placeholder="e.g. 510"
onInput={e => setGusts(e.target.value)}
/>
Gusts
</div>
</label>
</>
);
}
}