Skip to content
Snippets Groups Projects
Commit e9801c86 authored by Ray Schamp's avatar Ray Schamp
Browse files

Set default stage size

parent 4a6e59cf
No related branches found
No related tags found
No related merge requests found
...@@ -6,17 +6,23 @@ class Stage extends React.Component { ...@@ -6,17 +6,23 @@ class Stage extends React.Component {
<canvas <canvas
className="scratch-stage" className="scratch-stage"
ref={this.props.stageRef} ref={this.props.stageRef}
width={this.props.width}
height={this.props.height}
/> />
); );
} }
} }
Stage.propTypes = { Stage.propTypes = {
stageRef: React.PropTypes.func stageRef: React.PropTypes.func,
width: React.PropTypes.number,
height: React.PropTypes.number
}; };
Stage.defaultProps = { Stage.defaultProps = {
stageRef: function () {} stageRef: function () {},
width: 480,
height: 360
}; };
module.exports = Stage; module.exports = Stage;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment