-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPortal.js
More file actions
26 lines (20 loc) · 713 Bytes
/
Portal.js
File metadata and controls
26 lines (20 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/** @jsx React.DOM */
"use strict";
var React = require('react');
var cloneWithProps = require('react/lib/cloneWithProps');
var LayerMixin = require('./LayerMixin');
var Portal = React.createClass({
mixins: [LayerMixin],
render: function() {
return null;
},
renderLayer: function() {
// Extract out props used by this component.
// TODO: swap out to use ES6-7 spread operator when possible
// @see https://gist.github.com/sebmarkbage/a6e220b7097eb3c79ab7
// var {container, ...props} = this.props;
// return <div {...props}>{this.props.children}</div>;
return cloneWithProps(<div container={null}>{this.props.children}</div>, this.props);
}
});
module.exports = Portal;