2017-07-17 18:39:50 -04:00
|
|
|
import PropTypes from 'prop-types';
|
2017-07-13 14:03:48 -04:00
|
|
|
import React from 'react';
|
2017-07-17 18:39:50 -04:00
|
|
|
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
|
|
|
|
2017-07-17 18:39:50 -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-17 18:39:50 -04:00
|
|
|
);
|
2017-07-13 14:03:48 -04:00
|
|
|
|
2017-07-17 18:39:50 -04:00
|
|
|
PaintEditorComponent.propTypes = {
|
2017-07-20 22:48:07 -04:00
|
|
|
canvasId: PropTypes.string.isRequired,
|
2017-07-17 18:39:50 -04:00
|
|
|
tool: PropTypes.shape({
|
|
|
|
name: PropTypes.string.isRequired
|
|
|
|
})
|
2017-07-13 14:03:48 -04:00
|
|
|
};
|
2017-07-17 18:39:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
module.exports = PaintEditorComponent;
|