diff options
author | Emiliano Ciavatta | 2020-09-27 15:48:38 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-09-27 15:48:38 +0000 |
commit | 1412a34f64e234dbc7d4e6815b841699f4dd104a (patch) | |
tree | 3575bfa3d8e4d926066d3a84991809ca14083d97 /frontend/src/components/fields/TextField.js | |
parent | 44af615b32faf53c04cd38cb63782cf1b1332c94 (diff) |
Add other custom fields
Diffstat (limited to 'frontend/src/components/fields/TextField.js')
-rw-r--r-- | frontend/src/components/fields/TextField.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/frontend/src/components/fields/TextField.js b/frontend/src/components/fields/TextField.js index 86b98ed..de68c21 100644 --- a/frontend/src/components/fields/TextField.js +++ b/frontend/src/components/fields/TextField.js @@ -1,5 +1,6 @@ import React, {Component} from 'react'; import './TextField.scss'; +import './common.scss'; import {randomClassName} from "../../utils"; const classNames = require('classnames'); @@ -28,11 +29,11 @@ class TextField extends Component { }; return ( - <div className={classNames("text-field", {"field-active": this.props.active}, + <div className={classNames("field", "text-field", {"field-active": this.props.active}, {"field-invalid": this.props.invalid}, {"field-small": this.props.small})}> {name && <label htmlFor={this.id}>{name}:</label>} <textarea id={this.id} placeholder={this.props.defaultValue} onChange={handler} rows={rows} - readOnly={this.props.readonly} value={this.props.value} /> + readOnly={this.props.readonly} value={this.props.value} ref={this.props.textRef} /> {error && <div className="field-error">error: {error}</div>} </div> ); |