updateComponentSettings(
settings.id,
{
...settings,
dividerType: e.target.value,
},
true,
false
)
}
>
}
label="Horizontal"
/>
}
label="Vertical"
/>
),
});
const sectionsWithColorPickerChange = updateSection(
withType,
SectionTypes.COLORPICKER,
{
onChange: (e) => {
updateComponentStyle(settings.id, { backgroundColor: e.hex });
},
}
);
const sectionsWithHeightChange = updateSection(
sectionsWithColorPickerChange,
SectionTypes.HEIGHT,
{
onChange: (resp) => {
switch (resp) {
case "GROW": {
const height = _.get(settings, "properties.height", 0) + 10;
updateComponentStyle(settings.id, { height }, true, false);
break;
}
case "SHRINK": {
const height = _.get(settings, "properties.height", 6) - 10;
updateComponentStyle(settings.id, { height }, true, false);
break;
}
default: {
const height = resp;
updateComponentStyle(settings.id, { height }, true, false);
}
}
},
}
);
return (