diff --git a/src/components/fill-color-indicator.jsx b/src/components/fill-color-indicator.jsx new file mode 100644 index 00000000..2cad237a --- /dev/null +++ b/src/components/fill-color-indicator.jsx @@ -0,0 +1,37 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import {defineMessages, injectIntl, intlShape} from 'react-intl'; +import BufferedInputHOC from './forms/buffered-input-hoc.jsx'; +import Label from './forms/label.jsx'; +import Input from './forms/input.jsx'; + +import styles from './paint-editor.css'; + +const BufferedInput = BufferedInputHOC(Input); +const messages = defineMessages({ + fill: { + id: 'paint.paintEditor.fill', + description: 'Label for the color picker for the fill color', + defaultMessage: 'Fill' + } +}); +const FillColorIndicatorComponent = props => ( +
+ +
+); + +FillColorIndicatorComponent.propTypes = { + fillColor: PropTypes.string.isRequired, + intl: intlShape, + onChangeFillColor: PropTypes.func.isRequired +}; + +export default injectIntl(FillColorIndicatorComponent); diff --git a/src/components/paint-editor.jsx b/src/components/paint-editor.jsx index 4b482f5d..0cb83276 100644 --- a/src/components/paint-editor.jsx +++ b/src/components/paint-editor.jsx @@ -5,6 +5,8 @@ import BrushMode from '../containers/brush-mode.jsx'; import EraserMode from '../containers/eraser-mode.jsx'; import PropTypes from 'prop-types'; import LineMode from '../containers/line-mode.jsx'; +import FillColorIndicatorComponent from '../containers/fill-color-indicator.jsx'; +import StrokeColorIndicatorComponent from '../containers/stroke-color-indicator.jsx'; import {defineMessages, injectIntl, intlShape} from 'react-intl'; import BufferedInputHOC from './forms/buffered-input-hoc.jsx'; @@ -19,16 +21,6 @@ const messages = defineMessages({ id: 'paint.paintEditor.costume', description: 'Label for the name of a sound', defaultMessage: 'Costume' - }, - fill: { - id: 'paint.paintEditor.fill', - description: 'Label for the color picker for the fill color', - defaultMessage: 'Fill' - }, - outline: { - id: 'paint.paintEditor.outline', - description: 'Label for the color picker for the outline color', - defaultMessage: 'Outline' } }); @@ -52,7 +44,6 @@ class PaintEditorComponent extends React.Component {