ship-gis/src/publish/components/Slider.jsx
LHT e45be93e71 chore: publish 폴더 복원 및 그레이스풀 폴백 적용
- git 이력에서 publish 파일 45개 복원 (layouts, pages, components, scss)
- Sidebar.jsx: import.meta.glob 패턴으로 publish 폴더 없이도 빌드 가능
- App.jsx: lazy import에 catch 추가로 publish 누락 시 안내 메시지 표시
- .gitignore: src/publish/ 제외 해제 (git 추적 포함)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:29:01 +09:00

25 lines
590 B
JavaScript

import { useState } from "react";
function Slider({ label = "", min = 0, max = 100, defaultValue = 50 }) {
const [value, setValue] = useState(defaultValue);
const percent = ((value - min) / (max - min)) * 100;
return (
<label className="rangeWrap">
<span className="rangeLabel">{label}</span>
<input
type="range"
min={min}
max={max}
value={value}
onChange={(e) => setValue(Number(e.target.value))}
style={{ "--percent": `${percent}%` }}
aria-label={label}
/>
</label>
);
}
export default Slider;