Skip to content

Commit

Permalink
add download modal
Browse files Browse the repository at this point in the history
Signed-off-by: MiriSafra <[email protected]>
  • Loading branch information
MiriSafra committed Oct 28, 2024
1 parent c4ec692 commit 181d859
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import {
DropdownItem,
Modal,
Tooltip,
FormGroup,
} from "@patternfly/react-core";
import {
CodeIcon,
PencilAltIcon,
TagIcon,
WarningTriangleIcon,
Expand Down Expand Up @@ -1357,6 +1359,35 @@ export const ApplicationsTable: React.FC = () => {
}}
/>
</div>
<Modal
isOpen={isDownloadModalOpen}
variant="small"
title={t("actions.download", { what: "analysis details reports" })}
onClose={() => setIsDownloadModalOpen(false)} // סגור את המודל
>
<FormGroup label="Select Format" fieldId="format-select">
<div>
<Button
variant={selectedFormat === "json" ? "primary" : "secondary"}
onClick={() => setSelectedFormat("json")}
>
{<CodeIcon />}
JSON
</Button>
<Button
variant={selectedFormat === "yaml" ? "primary" : "secondary"}
onClick={() => setSelectedFormat("yaml")}
>
{<CodeIcon />}
YAML
</Button>
</div>
<p>Selected Format: {selectedFormat}</p>
</FormGroup>
<Button variant="primary" onClick={handleDownload}>
{t("actions.download")}
</Button>
</Modal>
</ConditionalRender>
);
};

0 comments on commit 181d859

Please sign in to comment.