Set default stage size
This commit is contained in:
1 parent
4a6e59cf94
commit
e9801c8697
1 file changed
+8
-2
@@ -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;
|
||||
Reference in new issue
Block a user