Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const height = Math.max(this.props.height, 0) + DRAG_HANDLE_HEIGHT;
const rootStyle = Object.assign(
{
height,
top: HEADERBAR_HEIGHT,
backgroundColor: this.props.editMode
? colors.yellow050
: colors.white,
paddingBottom: DRAG_HANDLE_HEIGHT,
},
// Disable animations while dragging
this.state.dragging ? { transition: 'none' } : {}
);
return (
<div style="{rootStyle}">
<div>{this.props.children}</div>
{this.renderDragHandle()}
</div>
);
}
}