add print form a and b
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import {Box, Container, Divider, Grid, Paper, Stack, Typography} from '@mui/material';
|
||||
|
||||
const PrintablePage = ({children, header, footer, paperSx = {}}) => (
|
||||
<>
|
||||
const PrintablePage = ({children, header, footer, paperSx = {}, landscape = false}) => (<>
|
||||
<Box sx={{width: "100%", height: 8, displayPrint: 'none'}}/>
|
||||
<Container
|
||||
sx={{
|
||||
width: '21cm',
|
||||
minHeight: '29.7cm',
|
||||
width: landscape ? '29.7cm' : '21cm',
|
||||
minHeight: landscape ? '21cm' : '29.7cm',
|
||||
margin: '0 auto',
|
||||
backgroundColor: 'white',
|
||||
p: '16px !important',
|
||||
@@ -42,13 +41,7 @@ const PrintablePage = ({children, header, footer, paperSx = {}}) => (
|
||||
{children}
|
||||
</Paper>
|
||||
<Box sx={{
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
px: 4,
|
||||
pb: 2,
|
||||
display: footer ? '' : 'none'
|
||||
position: 'absolute', bottom: 0, left: 0, width: '100%', px: 4, pb: 2, display: footer ? '' : 'none'
|
||||
}}>
|
||||
<Divider sx={{borderStyle: 'double', borderBottomWidth: 3, borderColor: '#000'}}/>
|
||||
<Stack sx={{my: .5}}>
|
||||
@@ -76,7 +69,6 @@ const PrintablePage = ({children, header, footer, paperSx = {}}) => (
|
||||
</Box>
|
||||
</Container>
|
||||
<Box sx={{width: "100%", height: 8, displayPrint: 'none'}}/>
|
||||
</>
|
||||
);
|
||||
</>);
|
||||
|
||||
export default PrintablePage;
|
||||
Reference in New Issue
Block a user