diff options
author | elijah <elijah@riseup.net> | 2016-09-05 17:34:11 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-09-05 17:39:32 -0700 |
commit | 141702748572a977133ae60ea8b39ce76342d7ce (patch) | |
tree | a3d8b7f4a18f95ac8c0855158876bb7cf7800721 /src/leap/bitmask_js/app/components/center.js | |
parent | ec52670d15742aad146b061c28bbe02ac7d93da3 (diff) |
webkit support: get the js and css working in older webkit enginesfeature/js-ui
Diffstat (limited to 'src/leap/bitmask_js/app/components/center.js')
-rw-r--r-- | src/leap/bitmask_js/app/components/center.js | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/leap/bitmask_js/app/components/center.js b/src/leap/bitmask_js/app/components/center.js index a3b6409a..6fa62128 100644 --- a/src/leap/bitmask_js/app/components/center.js +++ b/src/leap/bitmask_js/app/components/center.js @@ -4,22 +4,6 @@ import React from 'react' -const CONTAINER_CSS = { - position: 'absolute', - display: 'flex', - justifyContent: 'center', - alignContent: 'center', - alignItems: 'center', - top: "0px", - left: "0px", - height: "100%", - width: "100%" -} - -const ITEM_CSS = { - flex: "0 1 auto" -} - class Center extends React.Component { static get defaultProps() {return{ @@ -31,9 +15,12 @@ class Center extends React.Component { } render() { - let style = this.props.width ? Object.assign({width: this.props.width + 'px'}, ITEM_CSS) : ITEM_CSS + let style = null + if (this.props.width) { + style = {width: this.props.width + 'px'} + } return ( - <div className="center-container" style={CONTAINER_CSS}> + <div className="center-container"> <div className="center-item" style={style}> {this.props.children} </div> |