Удалены компоненты FlatCard и ProjectFilter; обновлены стили в Footer и SearchFilters, добавлены новые компоненты ProjectSelect и UnitTypesSelect для улучшения фильтрации проектов.

This commit is contained in:
2025-04-28 19:23:11 +05:00
parent a44f2fbb98
commit f82b114db1
9 changed files with 200 additions and 109 deletions
+11 -4
View File
@@ -10,10 +10,12 @@ function Select({
options,
onSelect,
className = "",
label = "",
}: {
options: string[];
onSelect: (option: string) => void;
className?: string;
label?: string;
}) {
const [isShow, setIsShow] = useState(false);
const [selectedOption, setSelectedOption] = useState(options[0]);
@@ -25,9 +27,14 @@ function Select({
return (
<div ref={ref} className={clsx("relative", className)}>
{label && (
<p className="text-s text-[#0D1922]/70 2xl:mb-[0.556vw] mb-2">
{label}
</p>
)}
<button
className={clsx(
"px-4 py-[14px] rounded-xl ring-1 transition-[box-shadow] w-full text-left flex items-center justify-between group",
"2xl:px-[1.111vw] px-4 2xl:py-[0.833vw] py-3 2xl:rounded-[0.833vw] rounded-xl 2xl:ring-[0.069vw] ring-1 transition-[box-shadow] w-full text-left flex items-center justify-between group",
isShow ? " ring-[#00BED7]" : "ring-[#E2E2DC]"
)}
onClick={() => setIsShow(!isShow)}
@@ -35,7 +42,7 @@ function Select({
<p className="text-s">{selectedOption}</p>
<ChevronDownIcon
className={clsx(
"w-6 h-6 flex-shrink-0 group-hover:text-[#00BED7] transition-[color,rotate]",
"2xl:w-[1.667vw] 2xl:h-[1.667vw] w-6 h-6 flex-shrink-0 group-hover:text-[#00BED7] transition-[color,rotate]",
isShow && "rotate-180"
)}
/>
@@ -47,7 +54,7 @@ function Select({
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.15 }}
className="absolute mt-1 p-1 space-y-0.5 shadow-[0px_2px_8px_rgba(0,0,0,0.15)] rounded-xl bg-white w-full z-10"
className="absolute 2xl:mt-[0.278vw] 2xl:pt-[0.278vw] mt-1 p-1 2xl:space-y-[0.139vw] space-y-0.5 shadow-[0px_2px_8px_rgba(0,0,0,0.15)] rounded-xl bg-white w-full z-10"
>
{options.map((option, index) => (
<button
@@ -67,7 +74,7 @@ function Select({
{option}
</p>
{selectedOption === option && (
<CheckIcon className="w-6 h-6 flex-shrink-0 text-[#00BED7]" />
<CheckIcon className="2xl:w-[1.667vw] 2xl:h-[1.667vw] w-6 h-6 flex-shrink-0 text-[#00BED7]" />
)}
</button>
))}