Files
nobat724_front/components/clinics/head/SearchBar.js
T
2025-05-03 19:06:59 +03:30

61 lines
1.9 KiB
JavaScript

"use client";
import { Button, ButtonGroup, TextField } from "@mui/material";
import SearchD from "@/components/icons/SearchD";
import ModalSearchCity from "@/app/component/modalSearchCity";
import { useState } from "react";
import ButtonFilter from "@/app/component/modalSearchCity/ButtonFilter";
function SearchBar() {
const [selected, setSelected] = useState({
province: "",
city: "",
});
const [open, setOpen] = useState(false);
return (
<ButtonGroup
variant="contained"
className="
!bg-[#FFF] !w-full sm:!w-2/3 !mt-[30px] !rounded-lg !overflow-hidden flex items-center
!shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
!h-fit !pl-1"
>
<ModalSearchCity
open={open}
setOpen={setOpen}
selected={selected}
setSelected={setSelected}
>
<ButtonFilter setOpen={setOpen} selected={selected} />
</ModalSearchCity>
<TextField
variant="standard"
InputProps={{
disableUnderline: true,
}}
sx={{
background: "transparent !important",
"& .MuiInputBase-input": { color: "#7E7E7E" },
"& .MuiInput-root": { borderBottom: "none" },
"& .MuiInputBase-root": { height: "100%" },
}}
placeholder="جستجوی تخصص"
dir="rtl"
className={`!shadow-none !w-full !min-w-3 !px-5 !h-full bg-[#FAFAFA] !text-[14px] md:!text-[16px] lg:!min-w-[50%] !rounded-0 !font-normal !text-[#6C757D]`}
/>
<Button
className="
!rounded-[4px] !gap-2.5 !p-2 md:!p-3 lg:!p-4 !min-w-fit
!w-[38px] sm:!w-[44px] md:!w-[50px] lg:!w-[56px]
!h-[38px] sm:!h-[44px] md:!h-[50px] lg:!h-[56px]
"
>
<SearchD />
</Button>
</ButtonGroup>
);
}
export default SearchBar;