2017-09-07 17:59:14 -04:00
|
|
|
import {connect} from 'react-redux';
|
|
|
|
import {changeStrokeColor} from '../reducers/stroke-color';
|
|
|
|
import StrokeColorIndicatorComponent from '../components/stroke-color-indicator.jsx';
|
2017-10-02 15:25:04 -04:00
|
|
|
import {applyStrokeColorToSelection} from '../helper/style-path';
|
2017-09-07 17:59:14 -04:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
strokeColor: state.scratchPaint.color.strokeColor
|
|
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
2017-09-11 13:28:35 -04:00
|
|
|
onChangeStrokeColor: strokeColor => {
|
2017-10-02 15:25:04 -04:00
|
|
|
applyStrokeColorToSelection(strokeColor);
|
2017-09-07 17:59:14 -04:00
|
|
|
dispatch(changeStrokeColor(strokeColor));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps
|
2017-09-11 13:28:35 -04:00
|
|
|
)(StrokeColorIndicatorComponent);
|