mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
New: Replace react-tether with react-popper (#789)
This commit is contained in:
parent
6ea7f97b16
commit
cf40df7606
39 changed files with 981 additions and 970 deletions
18
frontend/src/Components/Portal.js
Normal file
18
frontend/src/Components/Portal.js
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue