You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/frontend/src/Components/Menu/MenuContent.js

44 lines
814 B

import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Scroller from 'Components/Scroller/Scroller';
import styles from './MenuContent.css';
class MenuContent extends Component {
//
// Render
render() {
const {
className,
children,
maxHeight
} = this.props;
return (
<div
className={className}
style={{
maxHeight: maxHeight ? `${maxHeight}px` : undefined
}}
>
<Scroller className={styles.scroller}>
{children}
</Scroller>
</div>
);
}
}
MenuContent.propTypes = {
className: PropTypes.string,
children: PropTypes.node.isRequired,
maxHeight: PropTypes.number
};
MenuContent.defaultProps = {
className: styles.menuContent
};
export default MenuContent;