scratch-paint/src/components/text-mode/text-mode.jsx

23 lines
593 B
React
Raw Normal View History

2017-12-21 11:24:38 -05:00
import React from 'react';
2018-03-09 14:40:08 -05:00
import PropTypes from 'prop-types';
import messages from '../../lib/messages.js';
2017-12-21 11:24:38 -05:00
import ToolSelectComponent from '../tool-select-base/tool-select-base.jsx';
import textIcon from './text.svg';
2018-03-09 14:40:08 -05:00
const TextModeComponent = props => (
<ToolSelectComponent
imgDescriptor={messages.text}
2018-03-09 14:40:08 -05:00
imgSrc={textIcon}
isSelected={props.isSelected}
onMouseDown={props.onMouseDown}
/>
2017-12-21 11:24:38 -05:00
);
2018-03-09 14:40:08 -05:00
TextModeComponent.propTypes = {
isSelected: PropTypes.bool.isRequired,
onMouseDown: PropTypes.func.isRequired
};
2017-12-21 11:24:38 -05:00
export default TextModeComponent;