cf-style-container
Advanced tools
Comparing version 5.2.1 to 5.3.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="5.3.0"></a> | ||
# [5.3.0](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@5.2.1...cf-style-container@5.3.0) (2017-10-24) | ||
### Features | ||
* **cf-component-calendar:** WWW-13497 Add cf-component-calendar ([2012b46](http://stash.cfops.it:7999/www/cf-ux/commits/2012b46)) | ||
<a name="5.2.1"></a> | ||
@@ -8,0 +19,0 @@ ## [5.2.1](http://stash.cfops.it:7999/www/cf-ux/compare/cf-style-container@5.2.0...cf-style-container@5.2.1) (2017-10-23) |
@@ -151,2 +151,4 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
value: function componentWillMount() { | ||
var contextTheme = this.context.theme || {}; | ||
staticStyles = typeof staticStyles === 'function' ? staticStyles(contextTheme) : staticStyles; | ||
this.context.renderer.renderStatic(staticStyles); | ||
@@ -164,3 +166,6 @@ } | ||
CompWithStaticStyles.contextTypes = { renderer: PropTypes.object }; | ||
CompWithStaticStyles.contextTypes = { | ||
renderer: PropTypes.object, | ||
theme: PropTypes.object | ||
}; | ||
@@ -167,0 +172,0 @@ return CompWithStaticStyles; |
@@ -94,2 +94,4 @@ 'use strict'; | ||
componentWillMount() { | ||
const contextTheme = this.context.theme || {}; | ||
staticStyles = typeof staticStyles === 'function' ? staticStyles(contextTheme) : staticStyles; | ||
this.context.renderer.renderStatic(staticStyles); | ||
@@ -103,3 +105,6 @@ } | ||
CompWithStaticStyles.contextTypes = { renderer: _propTypes2.default.object }; | ||
CompWithStaticStyles.contextTypes = { | ||
renderer: _propTypes2.default.object, | ||
theme: _propTypes2.default.object | ||
}; | ||
@@ -106,0 +111,0 @@ return CompWithStaticStyles; |
{ | ||
"name": "cf-style-container", | ||
"description": "Cloudflare Style Container", | ||
"version": "5.2.1", | ||
"version": "5.3.0", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "es/index.js", |
@@ -153,2 +153,4 @@ # cf-style-container | ||
Accepts a function or a string. If a function is provided, the baseTheme will be provided to the function. | ||
```jsx | ||
@@ -158,2 +160,5 @@ import { applyStaticStyles } from 'cf-style-container'; | ||
const staticStyles = '.purple-component { background-color: purple }'; | ||
// OR | ||
// const staticStyles = baseTheme => `.purple-component{background-color: ${baseTheme.purple} }` | ||
const MyComponent = () => <div className='purple-component' />; | ||
@@ -160,0 +165,0 @@ |
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
36229
264
9
430
245