Radio Group Input
InputRadioGroup
Option 1
Option 2
Option 3
import { useState } from "react";
import InputRadioGroup from "~/components/ui/input/InputRadioGroup";
type SelectType = string | number | undefined;
export default function PreviewInputRadioGroupWithState() {
const [value, setValue] = useState<SelectType>(2);
return (
<InputRadioGroup
name="name"
title="Title"
options={[
{
name: "Option 1",
value: 1,
},
{
name: "Option 2",
value: 2,
},
{
name: "Option 3",
value: 3,
disabled: true,
},
]}
value={value}
setValue={setValue}
/>
);
}
InputRadioGroupCards
Option 11
Option 22
Option 33
import InputRadioGroupCards from "../../InputRadioGroupCards";
export default function PreviewInputRadioGroupCards() {
return (
<div id="input-radio-group">
<div className="border border-dashed border-gray-300 bg-white p-6">
<InputRadioGroupCards
name="name"
title="Title"
options={[
{
name: "Option 1",
value: 1,
},
{
name: "Option 2",
value: 2,
},
{
name: "Option 3",
value: 3,
disabled: true,
},
]}
/>
</div>
</div>
);
}