Using Material UI with React and styled-components. My issue is with using a Dialog and printing. The modal overlay allows the background to be printed (which is not what we want). NOTE: I don't have control over the HTML in the background, so as an alternative I'd like to apply white to the background when printing so the background will not be printed. Any suggestion on how I can modify the CSS specifically for this situation?
I thought I'd do something like this but I haven't had any luck:
const useStyles = makeStyles({
root: {
'&[class*="MuiBackdrop-root"]': {
backgroundColor: "white !important",
},
},
})
<Dialog className={classes.root}>
...
</Dialog>
Thank you for your time!