RadioGroup
- React
To implement RadioGroup component into your project you'll need to add the import:
import { RadioGroup } from "@shoptet/ui";
After adding import into your project you can use it simply like:
<RadioGroup
name="test"
options={[
{
value: "male",
label: "Male",
tooltip: "Select this if you identify as a male.",
},
{
value: "female",
label: "Female",
},
{
value: "other",
label: "Other",
tooltip: "Select this if you identify as anything else.",
},
]}
getOptionValue={(option) => option.value}
getOptionLabel={(option) => option.label}
aria-label="Label"
data-testid="radio-group"
/>