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 animationData = this.state.expanded ? {left: 0} : {left: 75};
const inner = React.createElement('div', {style: {position: 'relative'}}, this.mapChildren());
const dynamicStyles = {
borderColor: this.props.foregroundColor,
backgroundColor: this.props.backgroundColor
};
return React.createElement(Animation, {data: animationData, duration: 350}, (d) => {
if (d.left > 0) {
d = Object.assign({}, {
left: d.left + '%',
// top: d.top + '%'
});
}
return React.createElement('div', {style: Object.assign({}, overlayStyles, d, dynamicStyles), onClick: this.handleClick, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave}, inner);
});
}
}