Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
withDisclosureContainer: PropTypes.func,
};
const defaultProps = {
panelBehavior: 'overlay',
};
/**
* The SlidePanel component does not support the full range of DisclosureManager sizes in its API. The potential sizes are mapped to the
* SlidePanel's supported sizes.
*/
const disclosureSizeToPanelSize = {
[availableDisclosureSizes.TINY]: 'small',
[availableDisclosureSizes.SMALL]: 'small',
[availableDisclosureSizes.MEDIUM]: 'large',
[availableDisclosureSizes.LARGE]: 'large',
[availableDisclosureSizes.HUGE]: 'large',
};
const disclosureDimensionsToPanelSize = (dimensions) => {
if (dimensions.width > 480 || dimensions.height > 600) {
return 'large';
}
return 'small';
};
class SlidePanelManager extends React.Component {
constructor(props) {
super(props);
this.renderSlidePanel = this.renderSlidePanel.bind(this);