2.1.3 • Published 8 months ago
rc-mounter v2.1.3
rc-mounter
Use ReactDOM.createPortal
as a component.
import { Portal } from 'rc-mounter';
<Portal>
// code....
</Portal>
Props
- container
- children
- disabled
- onRendered
Portal.propTypes = {
/**
* The children to render into the `container`.
*/
children: PropTypes.node,
/**
* A node, component instance, or function that returns either.
* The `container` will have the portal children appended to it.
* By default, it uses the body of the top-level document object,
* so it's simply `document.body` most of the time.
*/
container: PropTypes.oneOfType([
PropTypes.func,
PropTypes.instanceOf(React.Component),
PropTypes.instanceOf(Element),
]),
/**
* Disable the portal behavior.
* The children stay within it's parent DOM hierarchy.
*/
disabled: PropTypes.bool,
/**
* Callback fired once the children has been mounted into the `container`.
*
*/
onRendered: PropTypes.func,
};
2.0.3
8 months ago
2.1.3
8 months ago
2.1.2
4 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.1.9
7 years ago
1.1.8
7 years ago
1.1.7
7 years ago
1.1.6
8 years ago
1.1.5
8 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago