/
grigorin
/
InterviewHelper
Обзор
Документация
Войти
/
grigorin
/
InterviewHelper
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/components/ScoreInput.tsx
31 строка
807 B
Grigory Nevarov
обновил README.md
12 дек 2025, 16:02
12 дек 2025, 16:02
d560e85
Код
Авторство
О чём код?
import "./inputs.css"; interface ScoreInputProps { value: number | null; onChange: (score: number | null) => void; } export const ScoreInput = ({ value, onChange }: ScoreInputProps) => { return ( <div className="input-group"> <label className="input-label" htmlFor="score-input"> Оценка (1 — 10) </label> <input id="score-input" type="number" min={1} max={10} value={value ?? ""} onChange={(event) => { const next = event.target.value === "" ? null : Number(event.target.value); if (next === null || (next >= 1 && next <= 10)) { onChange(next); } }} className="score-input" placeholder="Введите оценку" /> </div> ); };