fix: use HM Label instead of bare <label> for switch fields

ai-generation-guard.mjs flagged REUSE-004 on 5 native <label>
wrappers around Switch controls in Toolbar/OptionsPanel; swapped to
@hm-design/ui's Label per AGENTS.md field-label rule. Remaining guard
findings (hidden file input, dynamic panel geometry, per-entity CAD
layer color) are documented exceptions with no matching HM component.

Refs #1
This commit is contained in:
minsung committed 2026-10-12 17:46:07 +09:00
1 parent b114581c07
commit c7a782f19c
2 files changed
+11 -11

No files matched your search

+6 -6
View File
@@ -107,13 +107,13 @@ export function OptionsPanel({
<div className="space-y-5">
<section className="space-y-3">
<h4 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">선가중치</h4>
<label className="flex items-center justify-between text-sm">
<Label className="w-full justify-between text-sm">
표시 사용
<Switch
checked={options.lineweightOn ?? false}
onCheckedChange={(on) => onSetLineweightOn(on)}
/>
</label>
</Label>
<SliderNumberRow
label="표시 배율 (px/mm)"
value={lwScale}
@@ -128,10 +128,10 @@ export function OptionsPanel({
<section className="space-y-3 border-t pt-4">
<h4 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">표시</h4>
<label className="flex items-center justify-between text-sm">
<Label className="w-full justify-between text-sm">
그리드
<Switch checked={options.grid} onCheckedChange={onSetGrid} />
</label>
</Label>
<SliderNumberRow
label="줌 속도"
value={options.zoomSpeed}
@@ -144,10 +144,10 @@ export function OptionsPanel({
<section className="space-y-3 border-t pt-4">
<h4 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">2.5D</h4>
<label className="flex items-center justify-between text-sm">
<Label className="w-full justify-between text-sm">
2.5D 보기
<Switch checked={is25D} onCheckedChange={onSet25D} />
</label>
</Label>
<div className={is25D ? '' : 'pointer-events-none opacity-50'}>
<SliderNumberRow
label="Z 높이 배율"