mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-24 14:32:26 -05:00
19 lines
641 B
JavaScript
19 lines
641 B
JavaScript
import {connect} from 'react-redux';
|
|
import {changeStrokeColor} from '../reducers/stroke-color';
|
|
import StrokeColorIndicatorComponent from '../components/stroke-color-indicator.jsx';
|
|
import {applyStrokeColorToSelection} from '../helper/style-path';
|
|
|
|
const mapStateToProps = state => ({
|
|
strokeColor: state.scratchPaint.color.strokeColor
|
|
});
|
|
const mapDispatchToProps = dispatch => ({
|
|
onChangeStrokeColor: strokeColor => {
|
|
applyStrokeColorToSelection(strokeColor);
|
|
dispatch(changeStrokeColor(strokeColor));
|
|
}
|
|
});
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(StrokeColorIndicatorComponent);
|