@os-design/core
Advanced tools
Comparing version 0.0.9 to 0.0.10
import React from 'react'; | ||
interface State { | ||
mounted: boolean; | ||
} | ||
/** | ||
@@ -6,5 +9,4 @@ * Renders the children at the end of the body. | ||
*/ | ||
declare class BodyPortal extends React.Component { | ||
private readonly container?; | ||
constructor(props: any); | ||
declare class BodyPortal extends React.Component<{}, State> { | ||
private container?; | ||
componentDidMount(): void; | ||
@@ -11,0 +13,0 @@ componentWillUnmount(): void; |
@@ -13,15 +13,8 @@ "use strict"; | ||
class BodyPortal extends react_1.default.Component { | ||
constructor(props) { | ||
super(props); | ||
if (process.browser) { | ||
this.container = document.createElement('div'); | ||
} | ||
} | ||
componentDidMount() { | ||
if (process.browser && this.container) { | ||
document.body.appendChild(this.container); | ||
} | ||
this.container = document.createElement('div'); | ||
document.body.appendChild(this.container); | ||
} | ||
componentWillUnmount() { | ||
if (process.browser && this.container) { | ||
if (this.container) { | ||
document.body.removeChild(this.container); | ||
@@ -28,0 +21,0 @@ } |
{ | ||
"name": "@os-design/core", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "6e11e102c96c57775aa20aeee2787459da0039fa" | ||
"gitHead": "c0b97c7174560d1a398d7cf33edf7d6252ca55ce" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54652
959