2.1.2 • Published 3 years ago
rc-mounter v2.1.2
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.1.2
3 years ago
2.1.1
3 years ago
2.1.0
3 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.1.9
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago