Skip to content

Commit

Permalink
✨ でもページのツール選択をラジオボタンに
Browse files Browse the repository at this point in the history
  • Loading branch information
SSlime-s committed May 17, 2024
1 parent 4070870 commit a3d3360
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions apps/client/app/routes/tmp2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,36 @@ export default function Tmp2() {
value={penSize}
onChange={(e) => setPenSize(Number(e.target.value))}
/>
<select
value={penType}
onChange={(e) => setPenType(e.target.value as PenType)}
>
<option value="pen">Pen</option>
<option value="eraser">Eraser</option>
<option value="bucket">Bucket</option>
</select>
<label>
<input
type="radio"
name="tool"
value="pen"
checked={penType === "pen"}
onChange={() => setPenType("pen")}
/>
pen
</label>
<label>
<input
type="radio"
name="tool"
value="eraser"
checked={penType === "eraser"}
onChange={() => setPenType("eraser")}
/>
eraser
</label>
<label>
<input
type="radio"
name="tool"
value="bucket"
checked={penType === "bucket"}
onChange={() => setPenType("bucket")}
/>
bucket
</label>
</div>
<Artboard canvasRef={canvasRef} mouseHandlers={mouseHandlers} />
</div>
Expand Down

0 comments on commit a3d3360

Please sign in to comment.