allows the Portal HOC root element to receive a style props. This allows coordinate runtime positioning of the portal element using top/left/bottom/right values (#1502)
parent
6290cf5ab2
commit
0e299a65b1
|
@ -7,6 +7,7 @@ class Portal extends Component {
|
|||
children: PropTypes.node,
|
||||
className: PropTypes.string,
|
||||
container: PropTypes.node,
|
||||
style: PropTypes.style,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -55,7 +56,11 @@ class Portal extends Component {
|
|||
|
||||
_getOverlay() {
|
||||
if (!this.props.children) return null;
|
||||
return <div className={this.props.className}>{this.props.children}</div>;
|
||||
return (
|
||||
<div className={this.props.className} style={this.props.style}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
_renderOverlay() {
|
||||
|
|
Loading…
Reference in New Issue