scratch-paint/src/components/paint-editor.jsx

27 lines
705 B
React
Raw Normal View History

import PropTypes from 'prop-types';
2017-07-13 14:03:48 -04:00
import React from 'react';
import PaperCanvas from '../containers/paper-canvas.jsx';
2017-07-20 22:48:07 -04:00
import BrushTool from '../containers/tools/brush-tool.jsx';
2017-07-25 11:53:54 -04:00
import EraserTool from '../containers/tools/eraser-tool.jsx';
2017-07-13 14:03:48 -04:00
const PaintEditorComponent = props => (
2017-07-20 22:48:07 -04:00
<div>
<PaperCanvas
canvasId={props.canvasId}
tool={props.tool}
/>
<BrushTool canvasId={props.canvasId} />
2017-07-25 11:53:54 -04:00
<EraserTool canvasId={props.canvasId} />
2017-07-20 22:48:07 -04:00
</div>
);
2017-07-13 14:03:48 -04:00
PaintEditorComponent.propTypes = {
2017-07-20 22:48:07 -04:00
canvasId: PropTypes.string.isRequired,
tool: PropTypes.shape({
name: PropTypes.string.isRequired
})
2017-07-13 14:03:48 -04:00
};
module.exports = PaintEditorComponent;