add props to ide view
This commit is contained in:
parent
323b48c511
commit
b9db744b99
1 changed files with 32 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
import React from 'react';
|
import React, { PropTypes } from 'react';
|
||||||
import Editor from '../components/Editor';
|
import Editor from '../components/Editor';
|
||||||
import PreviewFrame from '../components/PreviewFrame';
|
import PreviewFrame from '../components/PreviewFrame';
|
||||||
import Toolbar from '../components/Toolbar';
|
import Toolbar from '../components/Toolbar';
|
||||||
|
@ -61,6 +61,37 @@ class IDEView extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IDEView.propTypes = {
|
||||||
|
params: PropTypes.shape({
|
||||||
|
project_id: PropTypes.string
|
||||||
|
}),
|
||||||
|
getProject: PropTypes.func.isRequired,
|
||||||
|
user: PropTypes.object.isRequired,
|
||||||
|
createProject: PropTypes.func.isRequired,
|
||||||
|
saveProject: PropTypes.func.isRequired,
|
||||||
|
ide: PropTypes.shape({
|
||||||
|
isPlaying: PropTypes.bool.isRequired
|
||||||
|
}).isRequired,
|
||||||
|
startSketch: PropTypes.func.isRequired,
|
||||||
|
stopSketch: PropTypes.func.isRequired,
|
||||||
|
project: PropTypes.shape({
|
||||||
|
name: PropTypes.string.isRequired
|
||||||
|
}).isRequired,
|
||||||
|
setProjectName: PropTypes.func.isRequired,
|
||||||
|
openPreferences: PropTypes.func.isRequired,
|
||||||
|
preferences: PropTypes.shape({
|
||||||
|
isVisible: PropTypes.bool.isRequired,
|
||||||
|
fontSize: PropTypes.number.isRequired
|
||||||
|
}).isRequired,
|
||||||
|
closePreferences: PropTypes.func.isRequired,
|
||||||
|
increaseFont: PropTypes.func.isRequired,
|
||||||
|
decreaseFont: PropTypes.func.isRequired,
|
||||||
|
file: PropTypes.shape({
|
||||||
|
content: PropTypes.string.isRequired
|
||||||
|
}).isRequired,
|
||||||
|
updateFile: PropTypes.func.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
return {
|
return {
|
||||||
file: state.file,
|
file: state.file,
|
||||||
|
|
Loading…
Reference in a new issue