UNPKG

wix-style-react

Version:
29 lines (22 loc) 1.25 kB
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } import React from 'react'; import * as Composite from '../Composite'; import Label from '../Label'; import Input from '../Input'; import DatePicker from '../DatePicker'; import RangeInputWithLabelComposite from '../Composite/RangeInputWithLabelComposite/RangeInputWithLabelComposite'; var Range = function Range(_ref) { var children = _ref.children, props = _objectWithoutProperties(_ref, ['children']); return React.createElement( RangeInputWithLabelComposite, props, children ); }; Range.propTypes = _extends({}, RangeInputWithLabelComposite.propTypes, { children: Composite.children(Composite.optional(Label), Composite.oneOf(Input, DatePicker), Composite.oneOf(Input, DatePicker)) }); Range.displayName = 'Range'; export default Range;