UNPKG

wix-style-react

Version:
30 lines (22 loc) 1.09 kB
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 InputArea from '../InputArea'; import InputAreaWithLabelComposite from '../Composite/InputAreaWithLabelComposite/InputAreaWithLabelComposite'; import deprecationLog from '../utils/deprecationLog'; deprecationLog('Using "TextArea" is deprecated. Please see "3.2a Text Area" updated documentation for a composite usage of "FormField" and "TextInput".'); var TextArea = function TextArea(_ref) { var children = _ref.children, props = _objectWithoutProperties(_ref, ['children']); return React.createElement( InputAreaWithLabelComposite, props, children ); }; TextArea.propTypes = { children: Composite.children(Composite.optional(Label), Composite.once(InputArea)) }; TextArea.displayName = 'TextArea'; export default TextArea;