import { Command } from "../types"; import { setPluginState, transition } from "./BlurSelectionPlugin"; /** * Change the color of the blur selection. */ export const setColor = (color: string): Command => (state, dispatch) => { if (dispatch !== undefined) { setPluginState({ state, dispatch }, prevPluginState => transition(prevPluginState).withColor({ color })); } return true; };