Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
state => ({ element: getActiveElement(state) }),
{ deleteElement }
(state, { valueKey }: Object) => {
return {
value: get(getActiveElement(state), valueKey, 0)
};
},
null,
state => ({ element: getActiveElement(state) }),
{ updateElement }
export default connect((state, { value, valueKey, defaultValue }: Object) => {
return {
value: valueKey ? get(getActiveElement(state), valueKey, defaultValue) : value
};
})(Input);
state => {
const element = getActiveElement(state);
return {
elementType: element ? element.type : null
};
},
{ deactivateElement }
state => ({ element: getActiveElement(state) }),
{ updateElement }
(state, { styleAttribute }: Object) => {
const valueKey = "data.settings." + styleAttribute;
const element = getActiveElement(state);
return {
valueKey,
advanced: get(element, valueKey + ".advanced", false),
element: {
id: element.id,
type: element.type,
path: element.path
}
};
},
{ updateElement },
state => ({ element: getActiveElement(state) }),
{ updateElement }
export default connect((state, { value, valueKey, defaultValue }: Object) => {
return {
value: valueKey ? get(getActiveElement(state), valueKey, defaultValue) : value
};
})(ColorPicker);
state => {
const { id, type, path } = getActiveElement(state);
return { element: { id, type, path } };
},
{ updateElement },