refactor(ui): convert BulkActionsBar to modular bottom pill using children pattern

Resolves maintainer feedback regarding UI/UX layout and prevents code collisions with other PRs by extracting action logic out of the bar component.

Fixes #3602
This commit is contained in:
harsh-aghara committed 2026-05-02 14:28:12 +05:30
1 parent 4e284c1468
commit ff34c872c8
3 files changed
+106 -54

No files matched your search

@@ -7,7 +7,8 @@ import {
HeaderMonitorsSummary,
BulkActionsBar,
} from "@/Components/monitors";
import { TextField, Dialog } from "@/Components/inputs";
import { TextField, Dialog, Button } from "@/Components/inputs";
import { Play, Pause } from "lucide-react";
import { useGet, useDelete } from "@/Hooks/UseApi";
import { useIsAdmin } from "@/Hooks/useIsAdmin";
@@ -178,10 +179,23 @@ const InfrastructureMonitors = () => {
{!isLoading && (
<BulkActionsBar
selectedCount={selectedRows.length}
onResume={handleBulkResume}
onPause={handleBulkPause}
onCancel={handleCancelSelection}
/>
>
<Button
size="small"
startIcon={<Play size={16} />}
onClick={handleBulkResume}
>
{t("common.buttons.resume")}
</Button>
<Button
size="small"
startIcon={<Pause size={16} />}
onClick={handleBulkPause}
>
{t("common.buttons.pause")}
</Button>
</BulkActionsBar>
)}
<InfraMonitorsTable