add classname to doodle preview

This commit is contained in:
casperlamboo 2017-11-08 14:46:31 +01:00
parent 7a1cd8cc0c
commit ac42aa31ec

View File

@ -48,9 +48,9 @@ class DoodlePreview extends React.Component {
} }
render() { render() {
const { width, height } = this.props; const { width, height, className } = this.props;
return ( return (
<canvas width={width} height={height} ref="canvas" /> <canvas className={className} width={width} height={height} ref="canvas" />
); );
} }
} }
@ -60,6 +60,7 @@ DoodlePreview.defaultProps = {
pixelRatio: 1 pixelRatio: 1
}; };
DoodlePreview.propTypes = { DoodlePreview.propTypes = {
className: PropTypes.string,
width: PropTypes.number.isRequired, width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired, height: PropTypes.number.isRequired,
pixelRatio: PropTypes.number.isRequired, pixelRatio: PropTypes.number.isRequired,