essence-core
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -42,2 +42,9 @@ 'use strict'; | ||
_createClass(Block, [{ | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
classes: (0, _classnames2.default)(nextProps.className, nextProps.classes) | ||
}); | ||
} | ||
}, { | ||
key: 'renderBlock', | ||
@@ -44,0 +51,0 @@ value: function renderBlock() { |
@@ -28,28 +28,35 @@ 'use strict'; | ||
var Divider = (function (_React$Component) { | ||
_inherits(Divider, _React$Component); | ||
_inherits(Divider, _React$Component); | ||
function Divider(props) { | ||
_classCallCheck(this, Divider); | ||
function Divider(props) { | ||
_classCallCheck(this, Divider); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Divider).call(this, props)); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Divider).call(this, props)); | ||
_this.state = { | ||
classes: (0, _classnames2.default)('e-divider', _this.props.className, _this.props.classes) | ||
}; | ||
return _this; | ||
} | ||
_createClass(Divider, [{ | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
'div', | ||
_extends({}, this.props, { | ||
className: this.state.classes }), | ||
this.props.children | ||
); | ||
_this.state = { | ||
classes: (0, _classnames2.default)('e-divider', _this.props.className, _this.props.classes) | ||
}; | ||
return _this; | ||
} | ||
}]); | ||
return Divider; | ||
_createClass(Divider, [{ | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
classes: (0, _classnames2.default)('e-divider', nextProps.className, nextProps.classes) | ||
}); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
'div', | ||
_extends({}, this.props, { | ||
className: this.state.classes }), | ||
this.props.children | ||
); | ||
} | ||
}]); | ||
return Divider; | ||
})(_react2.default.Component); | ||
@@ -56,0 +63,0 @@ |
@@ -36,4 +36,3 @@ 'use strict'; | ||
_this.state = { | ||
classes: (0, _classnames2.default)(_this.props.className, _this.props.classes), | ||
text: false | ||
classes: (0, _classnames2.default)(_this.props.className, _this.props.classes) | ||
}; | ||
@@ -44,2 +43,9 @@ return _this; | ||
_createClass(Text, [{ | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
classes: (0, _classnames2.default)(nextProps.className, nextProps.classes) | ||
}); | ||
} | ||
}, { | ||
key: 'renderText', | ||
@@ -46,0 +52,0 @@ value: function renderText() { |
{ | ||
"name": "essence-core", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Essence Core - libs for Essence components.", | ||
@@ -5,0 +5,0 @@ "author": "Hetmann W. Iohan <wilhelm.hetmann@evozon.com>", |
@@ -13,2 +13,8 @@ import React from 'react'; | ||
} | ||
componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
classes: ClassNames(nextProps.className, nextProps.classes) | ||
}); | ||
} | ||
@@ -15,0 +21,0 @@ renderBlock() { |
@@ -14,2 +14,8 @@ import React from 'react'; | ||
componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
classes: ClassNames('e-divider', nextProps.className, nextProps.classes) | ||
}); | ||
} | ||
render() { | ||
@@ -16,0 +22,0 @@ return ( |
@@ -10,7 +10,12 @@ import React from 'react'; | ||
this.state = { | ||
classes: ClassNames(this.props.className, this.props.classes), | ||
text: false | ||
classes: ClassNames(this.props.className, this.props.classes) | ||
}; | ||
} | ||
componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
classes: ClassNames(nextProps.className, nextProps.classes) | ||
}); | ||
} | ||
renderText() { | ||
@@ -17,0 +22,0 @@ let textType = this.props.type; |
9187597
919