Skip to content

Commit

Permalink
fix: display overlay div to prevent hover effects
Browse files Browse the repository at this point in the history
close #3139
  • Loading branch information
hamed-musallam committed Jul 19, 2024
1 parent febaeeb commit 89a9c72
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions src/component/elements/print/PrintContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,32 @@ export function PrintContent(props: PrintFrameProps) {
);
}
return (
<InnerPrintFrame
printPageOptions={pageOptions}
onAfterPrint={() => {
setPageOptions(null);
onAfterPrint?.();
}}
onBeforePrint={() => {
onBeforePrint?.();
}}
>
{children}
</InnerPrintFrame>
<>
<div
style={{
backgroundColor: 'white',
opacity: 0.5,
left: 0,
top: 0,
position: 'fixed',
width: '100%',
height: '100%',
zIndex: 10,
}}
/>
<InnerPrintFrame
printPageOptions={pageOptions}
onAfterPrint={() => {
setPageOptions(null);
onAfterPrint?.();
}}
onBeforePrint={() => {
onBeforePrint?.();
}}
>
{children}
</InnerPrintFrame>
</>
);
}

Expand Down

0 comments on commit 89a9c72

Please sign in to comment.