Skip to content

Commit

Permalink
ui
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Sep 6, 2023
1 parent 7388e80 commit dc6a315
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,20 @@ const RowItem = ({
icon={isVisibleOnMap ? SHOW_SVG : HIDE_SVG}
/>
</button>
{isCustom && (
<Popover>
<PopoverTrigger asChild>
<button type="button" className="h-5 w-5">
<MoreHorizontal className="h-4 w-4 text-white" />
</button>
</PopoverTrigger>

<Popover>
<PopoverTrigger asChild>
<button
type="button"
className={cn({
'h-5 w-5': true,
invisible: !isCustom,
})}
>
<MoreHorizontal className="h-4 w-4 text-white" />
</button>
</PopoverTrigger>
{isCustom && (
<PopoverContent
className="w-auto rounded-2xl border-transparent p-0"
side="bottom"
Expand All @@ -82,8 +89,8 @@ const RowItem = ({
>
<ActionsComponent item={item} />
</PopoverContent>
</Popover>
)}
)}
</Popover>
</div>
</td>
</tr>
Expand Down
30 changes: 16 additions & 14 deletions app/layout/project/sidebar/project/inventory-panel/wdpas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,22 @@ const InventoryPanelProtectedAreas = ({
}));

return (
<div className="space-y-6">
<InventoryTable
loading={allProjectWDPAsQuery.isFetching}
data={data}
noDataMessage={noDataMessage}
columns={WDPA_TABLE_COLUMNS}
sorting={filters.sort}
selectedIds={selectedWDPAIds}
onSortChange={handleSort}
onSelectAll={handleSelectAll}
onSelectRow={handleSelectWDPA}
onToggleSeeOnMap={toggleSeeOnMap}
ActionsComponent={ActionsMenu}
/>
<div className="flex flex-col space-y-6 overflow-hidden">
<div className="h-full overflow-hidden">
<InventoryTable
loading={allProjectWDPAsQuery.isFetching}
data={data}
noDataMessage={noDataMessage}
columns={WDPA_TABLE_COLUMNS}
sorting={filters.sort}
selectedIds={selectedWDPAIds}
onSortChange={handleSort}
onSelectAll={handleSelectAll}
onSelectRow={handleSelectWDPA}
onToggleSeeOnMap={toggleSeeOnMap}
ActionsComponent={ActionsMenu}
/>
</div>
{displayBulkActions && <WDPABulkActionMenu selectedWDPAIds={selectedWDPAIds} />}
</div>
);
Expand Down

0 comments on commit dc6a315

Please sign in to comment.