UNPKG

colonel-kurtz

Version:
45 lines (32 loc) 1.34 kB
'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = _interopDefault(require('react')); var cx = _interopDefault(require('classnames')); function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; } var defaultProps = { element: 'figure' }; var Frame = /*@__PURE__*/(function (superclass) { function Frame () { superclass.apply(this, arguments); } if ( superclass ) Frame.__proto__ = superclass; Frame.prototype = Object.create( superclass && superclass.prototype ); Frame.prototype.constructor = Frame; Frame.prototype.render = function render () { var ref = this.props; var element = ref.element; var children = ref.children; var open = ref.open; var rest = objectWithoutProperties( ref, ["element", "children", "open"] ); var other = rest; var className = cx('col-frame', { 'col-frame-open': !!open }); return React.createElement(element, Object.assign({}, {className: className}, other), children) }; return Frame; }(React.Component)); Frame.defaultProps = defaultProps; module.exports = Frame; //# sourceMappingURL=frame.js.map