diff --git a/src/app/(client-components)/(HeroSearchForm)/(car-search-form)/RentalCarSearchForm.tsx b/src/app/(client-components)/(HeroSearchForm)/(car-search-form)/RentalCarSearchForm.tsx new file mode 100644 index 0000000..156a3ed --- /dev/null +++ b/src/app/(client-components)/(HeroSearchForm)/(car-search-form)/RentalCarSearchForm.tsx @@ -0,0 +1,70 @@ +"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("different")} + > + Different drop off +
+
setDropOffLocationType("same")} + > + Same drop off +
+
+ ); + }; + + const isDdropOffdifferent = dropOffLocationType === "different"; + + return ( +
+ {renderRadioBtn()} +
+ + {isDdropOffdifferent && ( + <> +
+ + + )} +
+ +
+
+ ); +}; + +export default RentalCarSearchForm;