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)

28 lines (25 loc) 950 B
import React__default from 'react'; import { FormItem, FormLabel } from '../11-form-item/index.js'; import { Textarea as Textarea$1 } from './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(Textarea$1, Object.assign({ id: id }, rows, columns, props)); } return (React__default.createElement(FormItem, null, React__default.createElement(FormLabel, { htmlFor: id }, label), React__default.createElement(Textarea$1, Object.assign({ id: id }, rows, columns, props)))); }; Textarea.defaultProps = { rows: 10 }; export { Textarea };