diff --git a/src/app/(client-components)/(HeroSearchFormSmall)/(car-search-form)/RentalCarSearchForm.tsx b/src/app/(client-components)/(HeroSearchFormSmall)/(car-search-form)/RentalCarSearchForm.tsx new file mode 100644 index 0000000..751571a --- /dev/null +++ b/src/app/(client-components)/(HeroSearchFormSmall)/(car-search-form)/RentalCarSearchForm.tsx @@ -0,0 +1,72 @@ +"use client"; + +import React, { FC, useState } from "react"; +import LocationInput from "../LocationInput"; +import RentalCarDatesRangeInput from "./RentalCarDatesRangeInput"; + +export interface RentalCarSearchFormProps {} + +const RentalCarSearchForm: FC = ({}) => { + const [dropOffLocationType, setDropOffLocationType] = useState< + "same" | "different" + >("different"); + + const renderRadioBtn = () => { + return ( +
+
setDropOffLocationType("same")} + > + Same drop off +
+
setDropOffLocationType("different")} + > + Different drop off +
+
+ ); + }; + + const renderForm = () => { + return ( +
+ {renderRadioBtn()} +
+ + {dropOffLocationType === "different" && ( + <> +
+ + + )} +
+ +
+
+ ); + }; + + return renderForm(); +}; + +export default RentalCarSearchForm;