diff --git a/src/Components/SignupPage/SignupPage.js b/src/Components/SignupPage/SignupPage.js
index 0aeeba9..0fecd88 100644
--- a/src/Components/SignupPage/SignupPage.js
+++ b/src/Components/SignupPage/SignupPage.js
@@ -7,7 +7,6 @@ import { db, auth } from "../../firebase";
import { createUserWithEmailAndPassword } from "firebase/auth";
import { Link, useNavigate } from "react-router-dom";
import TextInput from "../../pageElements/TextInput";
-import Radiogroup from "../../pageElements/Radiogroup";
import { v4 as uuidv4 } from "uuid";
import { collection, setDoc, doc } from "firebase/firestore";
import { splitEvery } from "../../Utils/Array";
@@ -22,6 +21,7 @@ import { signupFields } from "../../Constants/Fields/SignupFields";
import { paymentfields } from "../../Constants/Fields/PaymentFields";
import { signupRadioFields } from "../../Constants/Fields/RadioFields";
import PaymentModal from "../Modals/PaymentModal";
+import Radio from "../../pageElements/Radio";
import "../../styles/signup.scss";
import Stripe from "stripe";
@@ -404,17 +404,9 @@ const SignupPage = () => {
- {signupRadioFields?.map((group, i) => (
-
- handleChangeRadioInput(e, group[i])}
- />
-
- ))}
+ {signupRadioFields?.map((radio, i) => {
+ console.log("radio", radio);
+ })}
diff --git a/src/pageElements/Radio.js b/src/pageElements/Radio.js
index e4313cb..d677504 100644
--- a/src/pageElements/Radio.js
+++ b/src/pageElements/Radio.js
@@ -1,23 +1,95 @@
+import { CircleFill, Circle } from "react-bootstrap-icons";
-const Radio = ({
- rightLabel,
- leftLabel,
- containerClassName,
- labelClassName,
- ...props
-}) => {
+const Radio = (props) => {
+ const {
+ className,
+ classNames,
+ labelText,
+ title,
+ price,
+ ref,
+ onClick,
+ value,
+ options,
+ disabled,
+ } = props;
+ const classCheckbox = "checkbox";
+ const classOption = "option";
+ const foo = [];
return (
-
-
-
- {leftLabel && {leftLabel} }
-
- {rightLabel && {rightLabel} }
-
+
+ {options.map((option) => (
+ <>{option.name}>
+ ))}
);
};
+/**
+ * A radio button is a quick way to extract a single coded answer from our users by presenting multiple possibilities and allowing only one option to be chosen.
+ */
+
export default Radio;
-//
+/*
+ {options &&
+ options?.length &&
+ options.map((option, index) => (
+
!disabled && onClick && onClick(option)}
+ >
+
+ {value === option.value ? (
+
+
+ {
+ !disabled && onClick(e);
+ }}
+ />
+
+
+
+ {option.name}
+
+
+ ) : (
+
+
+ {
+ !disabled && onClick(e);
+ }}
+ />
+
+
+ {option.name}
+
+
+ )}
+
+
+ ))}
+ */
diff --git a/src/pageElements/Radiogroup.js b/src/pageElements/Radiogroup.js
index 3057a76..1ecd057 100644
--- a/src/pageElements/Radiogroup.js
+++ b/src/pageElements/Radiogroup.js
@@ -1,7 +1,6 @@
import { CircleFill, Circle } from "react-bootstrap-icons";
const Radiogroup = (props) => {
- console.log("hello");
const {
className,
classNames,
@@ -13,37 +12,25 @@ const Radiogroup = (props) => {
value,
options,
disabled,
- dynamicClassName,
- optionContainerDynamicClass,
} = props;
-
const classCheckbox = "checkbox";
const classOption = "option";
- const dynamicClass =
- dynamicClassName === "signup-option-div"
- ? dynamicClassName
- : "checkbox-option-div";
-
- const optionContainerDynamic = optionContainerDynamicClass
- ? optionContainerDynamicClass
- : "";
-
return (
{title &&
{title}
}
-
+
{options &&
options?.length &&
options.map((option, index) => (
!disabled && onClick && onClick(option)}
>
{value === option.value ? (
-
+
) : (
-
+
{
);
};
+/**
+ * A radio button is a quick way to extract a single coded answer from our users by presenting multiple possibilities and allowing only one option to be chosen.
+ */
+
export default Radiogroup;