feature/IO-3499-React-19 - The great button refactor of 2026

This commit is contained in:
Dave
2026-01-23 20:37:16 -05:00
parent 9475dfb4e8
commit 9a93a43642
66 changed files with 163 additions and 267 deletions

View File

@@ -1,5 +1,5 @@
import { MailFilled, PrinterFilled } from "@ant-design/icons";
import { Space, Spin } from "antd";
import { Button, Space, Spin } from "antd";
import { useState } from "react";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
@@ -26,16 +26,18 @@ export default function PrintWrapperComponent({
<Space>
{children || null}
{!emailOnly && (
<PrinterFilled
<Button
style={{ cursor: disabled ? "not-allowed" : null }}
icon={<PrinterFilled />}
disabled={disabled}
onClick={() => handlePrint("p")}
style={{ cursor: disabled ? "not-allowed" : null }}
/>
)}
<MailFilled
<Button
style={{ cursor: disabled ? "not-allowed" : null }}
icon={<MailFilled />}
disabled={disabled}
onClick={() => handlePrint("e")}
style={{ cursor: disabled ? "not-allowed" : null }}
/>
{loading && <Spin />}
</Space>