+19
-21
@@ -66,5 +66,2 @@ "use strict"; | ||
| overflow: "hidden", | ||
| backgroundColor: this.props.backgroundColor, | ||
| backgroundSize: this.props.backgroundSize, | ||
| backgroundImage: this.props.backgroundImage, | ||
| lineHeight: this.props.lineHeight | ||
@@ -74,21 +71,22 @@ }; | ||
| var children = []; | ||
| var bgStyle = { | ||
| zIndex: "-1", | ||
| position: "absolute", | ||
| top: 0, | ||
| left: 0, | ||
| right: 0, | ||
| bottom: 0, | ||
| width: "100%", | ||
| height: "100%", | ||
| overflow: "hidden", | ||
| backgroundColor: this.props.backgroundColor, | ||
| backgroundSize: this.props.backgroundSize, | ||
| backgroundImage: this.props.backgroundImage | ||
| }; | ||
| if (this.props.bg) { | ||
| var bgStyle = { | ||
| zIndex: "-1", | ||
| position: "absolute", | ||
| top: 0, | ||
| left: 0, | ||
| right: 0, | ||
| bottom: 0, | ||
| width: "100%", | ||
| height: "100%", | ||
| overflow: "hidden" | ||
| }; | ||
| children.push(React.createElement( | ||
| "div", | ||
| { key: "background", style: bgStyle }, | ||
| this.props.bg | ||
| )); | ||
| } | ||
| children.push(React.createElement( | ||
| "div", | ||
| { key: "background", style: bgStyle }, | ||
| this.props.bg || "" | ||
| )); | ||
@@ -95,0 +93,0 @@ var contentStyle = { |
+22
-22
@@ -62,5 +62,2 @@ 'use strict' | ||
| overflow: 'hidden', | ||
| backgroundColor: this.props.backgroundColor, | ||
| backgroundSize: this.props.backgroundSize, | ||
| backgroundImage: this.props.backgroundImage, | ||
| lineHeight: this.props.lineHeight | ||
@@ -70,22 +67,23 @@ } | ||
| let children = [] | ||
| if (this.props.bg) { | ||
| let bgStyle = { | ||
| zIndex: '-1', | ||
| position: 'absolute', | ||
| top: 0, | ||
| left: 0, | ||
| right: 0, | ||
| bottom: 0, | ||
| width: '100%', | ||
| height: '100%', | ||
| overflow: 'hidden' | ||
| } | ||
| children.push( | ||
| <div key='background' style={bgStyle}> | ||
| {this.props.bg} | ||
| </div> | ||
| ) | ||
| let bgStyle = { | ||
| zIndex: '-1', | ||
| position: 'absolute', | ||
| top: 0, | ||
| left: 0, | ||
| right: 0, | ||
| bottom: 0, | ||
| width: '100%', | ||
| height: '100%', | ||
| overflow: 'hidden', | ||
| backgroundColor: this.props.backgroundColor, | ||
| backgroundSize: this.props.backgroundSize, | ||
| backgroundImage: this.props.backgroundImage | ||
| } | ||
| children.push( | ||
| <div key='background' style={bgStyle}> | ||
| {this.props.bg || ''} | ||
| </div> | ||
| ) | ||
| let contentStyle = { | ||
@@ -98,3 +96,5 @@ padding: '10px', | ||
| children.push( | ||
| <div key="content" style={contentStyle}>{this.props.children}</div> | ||
| <div key="content" style={contentStyle}> | ||
| {this.props.children} | ||
| </div> | ||
| ) | ||
@@ -101,0 +101,0 @@ |
+1
-1
| { | ||
| "name": "react-tile", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "A tile ui component to display text and other media.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
14739
-0.66%304
-0.65%