|
1
|
import { Label, Input } from "@medusajs/ui" |
|
2
|
import { Textarea, RadioGroup } from "@medusajs/ui" |
|
3
|
|
|
4
|
export default function LabelWithInputs() { |
|
5
|
return ( |
|
6
|
<form className="flex flex-col gap-6"> |
|
7
|
<div className="flex flex-col gap-1"> |
|
8
|
<Label htmlFor="text-input">Text Input</Label> |
|
9
|
<Input id="text-input" placeholder="Enter text" /> |
|
10
|
</div> |
|
11
|
<div className="flex flex-col gap-1"> |
|
12
|
<Label htmlFor="checkbox-input">Checkbox</Label> |
|
13
|
<Input id="checkbox-input" type="checkbox" /> |
|
14
|
</div> |
|
15
|
<div className="flex flex-col gap-1"> |
|
16
|
<Label htmlFor="textarea-input">Textarea</Label> |
|
17
|
<Textarea |
|
18
|
id="textarea-input" |
|
19
|
placeholder="Enter details" |
|
20
|
className="border rounded p-2" |
|
21
|
/> |
|
22
|
</div> |
|
23
|
<div className="flex flex-col gap-1"> |
|
24
|
<Label>Radio Group</Label> |
|
25
|
<RadioGroup defaultValue="option-1" className="flex gap-4"> |
|
26
|
<div className="flex items-center gap-1"> |
|
27
|
<RadioGroup.Item id="radio-1" value="option-1" /> |
|
28
|
<Label htmlFor="radio-1">Option 1</Label> |
|
29
|
</div> |
|
30
|
<div className="flex items-center gap-1"> |
|
31
|
<RadioGroup.Item id="radio-2" value="option-2" /> |
|
32
|
<Label htmlFor="radio-2">Option 2</Label> |
|
33
|
</div> |
|
34
|
</RadioGroup> |
|
35
|
</div> |
|
36
|
</form> |
|
37
|
) |
|
38
|
} |