UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

35 lines (29 loc) 1.18 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = require('react'); var React__default = _interopDefault(React); var index = require('../11-form-item/index.js'); var styles = require('./styles.js'); /** * @file index.tsx * * @fileoverview Renders a textarea using the styles provided in the theme. */ /** * A textarea form element. Should be used for long text form elements. For larger or smaller * textareas make sure to manipulate the rows prop property. */ const Textarea = (props) => { const { label, id, rows, columns } = props; if (!label) { return React__default.createElement(styles.Textarea, Object.assign({ id: id }, rows, columns, props)); } return (React__default.createElement(index.FormItem, null, React__default.createElement(index.FormLabel, { htmlFor: id }, label), React__default.createElement(styles.Textarea, Object.assign({ id: id }, rows, columns, props)))); }; Textarea.defaultProps = { rows: 10 }; exports.Textarea = Textarea;