Set default stage size

This commit is contained in:
Ray Schamp committed 2016-09-28 17:35:03 -04:00
1 parent 4a6e59cf94
commit e9801c8697
1 file changed
+8 -2
+8 -2
View File
@@ -6,17 +6,23 @@ class Stage extends React.Component {
<canvas
className="scratch-stage"
ref={this.props.stageRef}
width={this.props.width}
height={this.props.height}
/>
);
}
}
Stage.propTypes = {
stageRef: React.PropTypes.func
stageRef: React.PropTypes.func,
width: React.PropTypes.number,
height: React.PropTypes.number
};
Stage.defaultProps = {
stageRef: function () {}
stageRef: function () {},
width: 480,
height: 360
};
module.exports = Stage;