I'm just starting out with React and Material-UI, and I'm trying to figure out how to print my current dialog.
The issue I'm running into is that I can't seem to find a way to set the Dialog to full screen for printing while keeping it smaller in the browser. Essentially, I want the Dialog to be maximized when printed but not when viewed on the web page.
Below is the basic code snippet in TSX:
import React, { Component} from 'react';
import { Button, Dialog } from '@material/core';
export default class MUITester extends Component {
render(){
return (
<Dialog fullScreen={false}>
<div>
<Button onClick={() => window.print()}>
PRINT
</Button>
</div>
</Dialog>
);
}
And here's the corresponding CSS file:
@media print {
.print {
fullScreen=true;
color: blue;
}
}
Is there a way to solve this using CSS alone, or do I need to rely on React/Material-UI?