react-to-print
react-to-print copied to clipboard
Add dynamic colors to print function
I tried not printing my footer and what i did was
const print = `
@media print {
footer {
display: none;
}
`;
const handlePrint = useReactToPrint({
content: () => componentRef.current,
copyStyles: true,
pageStyle: print,
});
but what it did was it stopped printing the css colors used in my component Isn't there a way to preserve the configs and just update the print query for footer as the default configs were printing the css color unless i had to set footer to display null and change the default print function to my custom
Moreover it also stopped printing my images which were rendering in my component