-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
127 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { makeStyles } from '@material-ui/core'; | ||
import React from 'react'; | ||
import { usePaperOptions } from './PaperOptionsProvider'; | ||
|
||
const footerStyles = makeStyles(() => ({ | ||
footer: { | ||
display: 'flex', | ||
padding: '10mm 5mm 5mm 0', | ||
width: '60%', | ||
position: 'absolute', | ||
bottom: 0, | ||
right: 0, | ||
}, | ||
footerName: { | ||
flexGrow: 1, | ||
display: 'flex', | ||
paddingRight: '2em', | ||
}, | ||
label: { | ||
flexGrow: 0, | ||
fontWeight: 'normal', | ||
paddingRight: '0.3em', | ||
}, | ||
footerDate: { | ||
flexGrow: 1, | ||
display: 'flex', | ||
}, | ||
footerBlank: { | ||
flexGrow: 1, | ||
borderBottom: '1px solid black', | ||
}, | ||
})); | ||
|
||
interface WorksheetFooterProps { | ||
itemCount: number; | ||
} | ||
|
||
const WorksheetFooter = ({ itemCount }: WorksheetFooterProps): JSX.Element => { | ||
const { options } = usePaperOptions(); | ||
const classes = footerStyles(); | ||
return ( | ||
<> | ||
<section | ||
className={classes.footer} | ||
style={{ | ||
bottom: options.margin, | ||
right: options.margin, | ||
}} | ||
> | ||
<div className={classes.footerName}> | ||
<strong className={classes.label}>Score:</strong> | ||
<span className={classes.footerBlank} /> | ||
<span> | ||
out of | ||
{' '} | ||
{ itemCount } | ||
</span> | ||
</div> | ||
<div className={classes.footerDate}> | ||
<strong className={classes.label}>Time:</strong> | ||
<span className={classes.footerBlank} /> | ||
<span>minutes</span> | ||
</div> | ||
</section> | ||
</> | ||
); | ||
}; | ||
|
||
export default WorksheetFooter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { makeStyles } from '@material-ui/core'; | ||
import React from 'react'; | ||
|
||
const headerStyles = makeStyles(() => ({ | ||
header: { | ||
display: 'flex', | ||
}, | ||
headerName: { | ||
flexGrow: 4, | ||
display: 'flex', | ||
paddingRight: '2em', | ||
}, | ||
label: { | ||
flexGrow: 0, | ||
fontWeight: 'normal', | ||
paddingRight: '0.3em', | ||
}, | ||
headerDate: { | ||
flexGrow: 2, | ||
display: 'flex', | ||
}, | ||
headerBlank: { | ||
flexGrow: 1, | ||
borderBottom: '1px solid black', | ||
}, | ||
instructions: { | ||
marginBottom: 0, | ||
marginTop: '10mm', | ||
fontSize: '16px', | ||
}, | ||
})); | ||
|
||
const WorksheetHeader = (): JSX.Element => { | ||
const classes = headerStyles(); | ||
return ( | ||
<> | ||
<section className={classes.header}> | ||
<div className={classes.headerName}> | ||
<strong className={classes.label}>Name:</strong> | ||
<span className={classes.headerBlank} /> | ||
</div> | ||
<div className={classes.headerDate}> | ||
<strong className={classes.label}>Date:</strong> | ||
<span className={classes.headerBlank} /> | ||
</div> | ||
</section> | ||
<p className={classes.instructions}> | ||
Complete the addition facts by filling in the blanks. | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
export default WorksheetHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters