Created
March 7, 2021 18:00
-
-
Save piotrrussw/39decfb669a0401f534377a8bf48bdc1 to your computer and use it in GitHub Desktop.
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
function ReactCanvasPaint(props) { | |
return ( | |
<div className={styles.container}> | |
<canvas | |
width={props.width} | |
height={props.height} | |
/> | |
</div> | |
) | |
} | |
ReactCanvasPaint.propTypes = { | |
width: PropTypes.number, | |
height: PropTypes.number, | |
} | |
ReactCanvasPaint.defaultProps = { | |
width: 400, | |
height: 400, | |
} | |
export default ReactCanvasPaint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment