apeman-react-section
Version:
apeman react package for section components.
68 lines (51 loc) • 1.37 kB
JavaScript
/**
* Section component.
* @class ApSection
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _apemanReactMixinUuid = require('apeman-react-mixin-uuid');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/** @lends ApSection */
var ApSection = _react2.default.createClass({
displayName: 'ApSection',
// --------------------
// Specs
// --------------------
propTypes: {
id: _react.PropTypes.string
},
mixins: [_apemanReactMixinUuid.ApUUIDMixin],
statics: {},
getInitialState: function getInitialState() {
return {};
},
getDefaultProps: function getDefaultProps() {
return {
id: null
};
},
render: function render() {
var s = this;
var props = s.props;
var id = props.id;
if (!id) {
id = s.uuid;
}
return _react2.default.createElement(
'section',
{ className: (0, _classnames2.default)('ap-section', props.className),
id: id,
style: Object.assign({}, props.style) },
props.children
);
}
});
exports.default = ApSection;
//# sourceMappingURL=data:application/json;base64,bnVsbA==