update src/components/FormInput/index.js

master
mahdi 2 years ago
parent a485b42b81
commit 9f649a16ca
  1. 18
      src/components/FormInput/index.js

@ -5,7 +5,7 @@ import DateRangePicker from "../DateRangePicker";
import Input from "../AnimatedInput/Input"; import Input from "../AnimatedInput/Input";
import CustomSelectBox from "../CustomSelectBox"; import CustomSelectBox from "../CustomSelectBox";
const FormInput = () => { const FormInput = ({ items }) => {
const { register, getValues } = useForm(); const { register, getValues } = useForm();
const [selectedInput, setSelectedInput] = useState(false); const [selectedInput, setSelectedInput] = useState(false);
@ -62,7 +62,7 @@ const FormInput = () => {
borderClassname={`border-transparent `} borderClassname={`border-transparent `}
className={``} className={``}
/> />
<CustomSelectBox /> <CustomSelectBox options={items} />
<Input <Input
register={register("foundus")} register={register("foundus")}
label="نحوه آشنایی با موکب" label="نحوه آشنایی با موکب"
@ -93,3 +93,17 @@ const FormInput = () => {
}; };
export default FormInput; export default FormInput;
FormInput.defaultProps = {
items: [
{
title: "mahdi",
},
{
title: "mahdi",
},
{
title: "mahdi",
},
],
};

Loading…
Cancel
Save