New: Replace react-tether with react-popper (#789)

This commit is contained in:
Qstick 2019-05-10 21:56:04 -04:00 committed by GitHub
parent 6ea7f97b16
commit cf40df7606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 981 additions and 970 deletions

View file

@ -10,30 +10,37 @@ class MenuContent extends Component {
render() {
const {
forwardedRef,
className,
children,
maxHeight
style,
isOpen
} = this.props;
return (
<div
ref={forwardedRef}
className={className}
style={{
maxHeight: maxHeight ? `${maxHeight}px` : undefined
}}
style={style}
>
<Scroller className={styles.scroller}>
{children}
</Scroller>
{
isOpen ?
<Scroller className={styles.scroller}>
{children}
</Scroller> :
null
}
</div>
);
}
}
MenuContent.propTypes = {
forwardedRef: PropTypes.func,
className: PropTypes.string,
children: PropTypes.node.isRequired,
maxHeight: PropTypes.number
style: PropTypes.object,
isOpen: PropTypes.bool
};
MenuContent.defaultProps = {