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
39 changed files with 981 additions and 970 deletions
+18
View File
@@ -0,0 +1,18 @@
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
function Portal(props) {
const { children, target } = props;
return ReactDOM.createPortal(children, target);
}
Portal.propTypes = {
children: PropTypes.node.isRequired,
target: PropTypes.object.isRequired
};
Portal.defaultProps = {
target: document.getElementById('portal-root')
};
export default Portal;