Skip to content

Instantly share code, notes, and snippets.

@piotrrussw
Created March 7, 2021 18:00
Show Gist options
  • Save piotrrussw/39decfb669a0401f534377a8bf48bdc1 to your computer and use it in GitHub Desktop.
Save piotrrussw/39decfb669a0401f534377a8bf48bdc1 to your computer and use it in GitHub Desktop.
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