-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Very basic temperature adjuster implementation. The UI is very raw and UX not ideal.
- Loading branch information
1 parent
6e6aa46
commit 96d951a
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { InputGroup, FormControl } from "react-bootstrap"; | ||
|
||
const TemperatureAdjuster = ({ | ||
currentTemperature, | ||
onTemperatureChange, | ||
loading, | ||
}: { | ||
currentTemperature: number; | ||
onTemperatureChange: (newTemperature: number) => void; | ||
loading: boolean; | ||
}) => ( | ||
<InputGroup className="mb-3"> | ||
<FormControl | ||
type="number" | ||
value={currentTemperature} | ||
onChange={(e) => onTemperatureChange(Number(e.target.value))} | ||
disabled={loading} | ||
/> | ||
</InputGroup> | ||
); | ||
|
||
export default TemperatureAdjuster; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters