Skip to content

Commit

Permalink
feat: add button (keephq#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl authored Apr 10, 2024
1 parent e6fe172 commit c410710
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions keep-ui/app/alerts/ViewAlertModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,23 @@ export const ViewAlertModal: React.FC<ViewAlertModalProps> = ({ alert, handleClo

return (
<Modal onClose={handleClose} isOpen={isOpen} className="overflow-visible max-w-fit">
<div className="flex justify-between items-center">
<h2 className="text-lg font-semibold">Alert Details</h2>
<Button onClick={handleCopy} color="orange">
Copy to Clipboard
</Button>
</div>
{alert && (
<pre className="p-2 bg-gray-100 rounded mt-2 overflow-auto">
{JSON.stringify(alert, null, 2)}
</pre>
)}
</Modal>
<div className="flex justify-between items-center mb-4">
<h2 className="text-lg font-semibold">Alert Details</h2>
<div className="flex gap-x-2"> {/* Adjust gap as needed */}
<Button onClick={handleCopy} color="orange">
Copy to Clipboard
</Button>
<Button onClick={handleClose} color="orange" variant="secondary">
Close
</Button>
</div>
</div>
{alert && (
<pre className="p-2 bg-gray-100 rounded mt-2 overflow-auto">
{JSON.stringify(alert, null, 2)}
</pre>
)}
</Modal>

);
};

0 comments on commit c410710

Please sign in to comment.