diff --git a/src/CAREUI/misc/PrintPreview.tsx b/src/CAREUI/misc/PrintPreview.tsx index 243826c7337..ad0e0983bf7 100644 --- a/src/CAREUI/misc/PrintPreview.tsx +++ b/src/CAREUI/misc/PrintPreview.tsx @@ -1,8 +1,9 @@ -import { ReactNode } from "react"; +import { ReactNode, useState } from "react"; import ButtonV2 from "../../Components/Common/components/ButtonV2"; import CareIcon from "../icons/CareIcon"; import { classNames } from "../../Utils/utils"; import Page from "../../Components/Common/components/Page"; +import useBreakpoints from "../../Common/hooks/useBreakpoints"; type Props = { children: ReactNode; @@ -12,17 +13,25 @@ type Props = { }; export default function PrintPreview(props: Props) { + const normalScale = useBreakpoints({ default: 0.44, md: 1 }); + const [scale, setScale] = useState(normalScale); + return (
-
- window.print()}> +
+ print()}> Print
-
+
+ +
+ setScale((scale) => scale * 1.25)} + > + + + + {Math.round(scale * 100)}% + + setScale((scale) => scale / 1.25)} + > + + +
);