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

26 lines
671 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';
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={{
defaultMessage: 'Text',
description: 'Label for the text tool',
id: 'paint.textMode.text'
}}
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;