style: format code with single quotes and add Lamp styling

This commit is contained in:
Loic Coenen
2026-06-24 22:42:53 +02:00
committed by Loic Coenen (aider)
parent 2c84312947
commit d8348a64ea
15 changed files with 331 additions and 175 deletions

View File

@@ -12,8 +12,11 @@ export function BerlinClock({ enabled, clock }: BerlinClockProps) {
return (
<div>
<div data-testid="seconds-row">
<Lamp state={clock.secondsRow[0]} id="seconds-lamp" />
<div
data-testid="seconds-row"
style={{ display: "flex", gap: 2, marginBottom: 5 }}
>
<Lamp state={clock.secondsRow[0]} id="seconds-lamp" variant="alone" />
</div>
<LampLine states={clock.fiveHours} rowTestId="five-hours-row" />
<LampLine states={clock.oneHour} rowTestId="single-hours-row" />

View File

@@ -1,5 +1,5 @@
import { useState } from 'react';
import { dateToDigital, digitalToDate } from '../utils';
import { useState } from "react";
import { dateToDigital, digitalToDate } from "../utils";
interface DigitalClockProps {
enabled: boolean;
@@ -7,7 +7,11 @@ interface DigitalClockProps {
onTimeChange: (time: Date) => void;
}
export function DigitalClock({ enabled, currentTime, onTimeChange }: DigitalClockProps) {
export function DigitalClock({
enabled,
currentTime,
onTimeChange,
}: DigitalClockProps) {
const [inputValue, setInputValue] = useState(dateToDigital(currentTime));
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {