(
+ {
+ defaultValues: {
+ joTown: "",
+ },
+ mode: "onChange",
+ reValidateMode: "onChange",
+ resolver: yupResolver(radioExampleSchema),
+ },
+ );
+
+ return (
+
+ );
+};
diff --git a/packages/react/src/components/Forms/Radio/index.tsx b/packages/react/src/components/Forms/Radio/index.tsx
index fa39b1c..9072189 100644
--- a/packages/react/src/components/Forms/Radio/index.tsx
+++ b/packages/react/src/components/Forms/Radio/index.tsx
@@ -1,4 +1,8 @@
-import React, { InputHTMLAttributes, PropsWithChildren } from "react";
+import React, {
+ InputHTMLAttributes,
+ PropsWithChildren,
+ forwardRef,
+} from "react";
import classNames from "classnames";
import { Field, FieldProps } from ":/components/Forms/Field";
@@ -7,22 +11,24 @@ type Props = InputHTMLAttributes &
label?: string;
};
-export const Radio = ({ label, text, state, ...props }: Props) => {
- return (
-
- );
-};
+export const Radio = forwardRef(
+ ({ label, text, state, ...props }: Props, ref) => {
+ return (
+
+ );
+ },
+);
export const RadioGroup = ({
children,