panel-header: Simplify condition

This commit is contained in:
Johannes Schill
2018-11-15 09:17:39 +01:00
parent 0a5f920bf5
commit 0430bb47c2

View File

@@ -6,7 +6,7 @@ class Popover extends PureComponent<UsingPopperProps> {
render() {
const { children, hidePopper, showPopper, className, ...restProps } = this.props;
const togglePopper = restProps.show === true ? hidePopper : showPopper;
const togglePopper = restProps.show ? hidePopper : showPopper;
return (
<div className={`popper__manager ${className}`} onClick={togglePopper}>