Skip to content

Commit 60219b2

Browse files
anikachurilovappanero
authored andcommitted
widgets: add rows props to TextArea component
1 parent bda3bea commit 60219b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/forms/widgets/text/TextArea.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TextAreaField } from "../../TextAreaField";
66

77
export default class TextArea extends Component {
88
render() {
9-
const { fieldPath, required, label, icon, description } = this.props;
9+
const { fieldPath, required, label, icon, description, rows } = this.props;
1010

1111
return (
1212
<>
@@ -15,6 +15,7 @@ export default class TextArea extends Component {
1515
fieldPath={fieldPath}
1616
required={required}
1717
label={<FieldLabel htmlFor={fieldPath} icon={icon} label={label} />}
18+
rows={rows}
1819
/>
1920
{description && <label className="helptext">{description}</label>}
2021
</>
@@ -28,9 +29,11 @@ TextArea.propTypes = {
2829
description: PropTypes.string.isRequired,
2930
icon: PropTypes.string,
3031
required: PropTypes.bool,
32+
rows: PropTypes.number,
3133
};
3234

3335
TextArea.defaultProps = {
3436
icon: undefined,
3537
required: false,
38+
rows: 3,
3639
};

0 commit comments

Comments
 (0)