Repository URL to install this package:
|
Version:
0.0.15 ▾
|
import * as React from 'react';
import toClassName from 'classnames';
import { StyledVirtualPortal } from './styled';
/**
* @api https://reactjs.org/docs/portals.html
* @property {HTMLDivElement} defaultNode
*/
class VirtualPortal extends React.PureComponent {
// or @computed?
getClassName() {
return toClassName('virtual-portal', this.props.className, {
visible: this.props.isVisible,
hidden: this.props.isVisible === false,
});
}
render() {
return (React.createElement(StyledVirtualPortal, { className: this.getClassName(), id: this.props.id }, this.props.children));
}
}
export { VirtualPortal };
export default VirtualPortal;
//# sourceMappingURL=VirtualPortal.js.map