Refactor, move all pages to separate folder

This commit is contained in:
Guntis Smaukstelis
2025-03-14 11:31:47 +02:00
parent 968a06c0f0
commit a2d1608cb0
54 changed files with 95 additions and 104 deletions
+53
View File
@@ -0,0 +1,53 @@
import { Component, Signal } from "solid-js";
export interface WindSignals {
direction: Signal<string>;
speed: Signal<string>;
gusts: Signal<string>;
roundValues: Signal<boolean>;
}
export const WindInputs: Component<{signals: WindSignals}> = (
{ signals: {
direction: [getDirection, setDirection],
speed: [getSpeed, setSpeed],
gusts: [getGusts, setGusts],
roundValues: [getRoundValues, setRoundValues],
}}
) => {
return (
<>
<div>
<label>
<input
type="checkbox"
checked={getRoundValues()}
onChange={e => setRoundValues(e.target.checked)}
/>
Round values
</label>
</div>
<div>
<input
type="text"
onInput={e => setDirection(e.target.value)}
/>
Wind direction
</div>
<div>
<input
type="text"
onInput={e => setSpeed(e.target.value)}
/>
Wind speed
</div>
<div>
<input
type="text"
onInput={e => setGusts(e.target.value)}
/>
Gusts
</div>
</>
);
}