Input component with storybook and testing

This commit is contained in:
adilallo
2025-10-10 09:07:47 -06:00
parent 04783d3f62
commit 2bc5fcdf45
12 changed files with 1838 additions and 46 deletions
+2 -3
View File
@@ -1,6 +1,6 @@
"use client";
import React, { memo, useCallback } from "react";
import React, { memo, useCallback, useId } from "react";
import RadioButton from "./RadioButton";
const RadioGroup = ({
@@ -15,8 +15,7 @@ const RadioGroup = ({
...props
}) => {
// Generate unique ID for accessibility if not provided
const groupId =
name || `radio-group-${Math.random().toString(36).substr(2, 9)}`;
const groupId = name || `radio-group-${useId()}`;
const handleChange = useCallback(
(optionValue) => {