i want to hide print button on clicking print button in the page. basically hide the print button on the web page once printing starts.
below is my code,
const printItems = () => {
window.print();
}
function ItemsTable() {
return(
<>
<TableCell>
<span>first</span>
</TableCell>
<PrintCell>
<CircleIconButton
name="print"
onClick={printItems}
>
</PrintCell>
</>
);
}
const TableCell = styled.div`
display: flex;
flex-direction: row;
`;
const PrintCell = styled(TableCell)`
width: 100px;
justify-content: flex-end;
`;
const CircleIconButton = styled(IconButton)`
border-radius: 15px;
background: none;
width: 32px;
height: 32px;
`;
Now i want to hide the PrintCell when user clicks CircleIconButton. how can i do it with css and media print.
could someone help me with this? thanks.