import * as React from 'react'; import './index.less'; interface DropListProps { show: boolean; onClose?: () => void; } class DropList extends React.Component { constructor(props: any) { super(props); this.handleClose = this.handleClose.bind(this); } handleClose(e: React.MouseEvent) { e.stopPropagation(); const { onClose } = this.props; if (typeof onClose === 'function') { onClose(); } } render() { return (
{this.props.children}
); } } export default DropList;