convert container to not a component

This commit is contained in:
DD 2017-09-11 13:54:48 -04:00
parent 9f40c633f8
commit 4e29f31639
2 changed files with 2 additions and 17 deletions

View file

@ -14,7 +14,6 @@ const StrokeWidthIndicatorComponent = props => (
small
max={MAX_STROKE_WIDTH}
min="0"
tabIndex="1"
type="number"
value={props.strokeWidth}
onSubmit={props.onChangeStrokeWidth}

View file

@ -1,26 +1,12 @@
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
import {changeStrokeWidth} from '../reducers/stroke-width';
import StrokeWidthIndicatorComponent from '../components/stroke-width-indicator.jsx';
const StrokeWidthIndicator = props => (
<StrokeWidthIndicatorComponent
strokeWidth={props.strokeWidth}
onChangeStrokeWidth={props.handleChangeStrokeWidth}
/>
);
StrokeWidthIndicator.propTypes = {
handleChangeStrokeWidth: PropTypes.func.isRequired,
strokeWidth: PropTypes.string.isRequired
};
const mapStateToProps = state => ({
strokeWidth: state.scratchPaint.color.strokeWidth
});
const mapDispatchToProps = dispatch => ({
handleChangeStrokeWidth: strokeWidth => {
onChangeStrokeWidth: strokeWidth => {
dispatch(changeStrokeWidth(strokeWidth));
}
});
@ -28,4 +14,4 @@ const mapDispatchToProps = dispatch => ({
export default connect(
mapStateToProps,
mapDispatchToProps
)(StrokeWidthIndicator);
)(StrokeWidthIndicatorComponent);