Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const setupAutoResize = (el) => {
event.on(EVENT.RESIZE, ({ width: newWidth, height: newHeight }) => {
if (typeof newWidth === 'number') {
el.style.width = toCSS(newWidth);
}
if (typeof newHeight === 'number') {
el.style.height = toCSS(newHeight);
}
});
};