From dab08ed1d9a1bdbb47ee5ef2bbff078539fc9968 Mon Sep 17 00:00:00 2001 From: Maina Wycliffe Date: Fri, 27 Oct 2023 10:09:49 +0300 Subject: [PATCH] fix: make the sort topology dropdown click area larger Closes #1409 --- .../TopologyPopover/topologySort.tsx | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/components/TopologyPopover/topologySort.tsx b/src/components/TopologyPopover/topologySort.tsx index 7acd079740..8c7f733c2f 100644 --- a/src/components/TopologyPopover/topologySort.tsx +++ b/src/components/TopologyPopover/topologySort.tsx @@ -148,26 +148,30 @@ export const TopologySort = ({ <>
} - className="flex mt-1 cursor-pointer md:mt-0 md:items-center border border-gray-300 bg-white rounded-md shadow-sm px-3 py-2" + className="flex cursor-pointer p-0 md:items-center border border-gray-300 bg-white rounded-md shadow-sm" > - {sortByDirection === "asc" && ( - onSelectSortOption(sortBy, "desc")} - /> - )} - {sortByDirection === "desc" && ( - onSelectSortOption(sortBy, "asc")} - /> - )} - + onSelectSortOption( + sortBy, + sortByDirection === "asc" ? "desc" : "asc" + ) + } + className="flex items-center justify-center text-gray-700 hover:text-gray-900 px-3 py-1 pr-1" + > + {sortByDirection === "asc" && ( + + )} + {sortByDirection === "desc" && ( + + )} +
+
setIsPopoverActive((val) => !val)} > {sortLabels.find((s) => s.value === sortBy)?.label} - +