summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/components
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-02 00:41:56 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-02 00:41:56 +0200
commit1f5bd704c3e44d7794127f3dcf68fd3e67ad3ed7 (patch)
tree7c31baccdc537f32eee5d0015287735bc0bbdfbf /animism-align/frontend/views/align/components
parent3e2c1d432d73823e66e19d0081b498ace467b231 (diff)
render textarea
Diffstat (limited to 'animism-align/frontend/views/align/components')
-rw-r--r--animism-align/frontend/views/align/components/annotations/annotation.form.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/animism-align/frontend/views/align/components/annotations/annotation.form.js b/animism-align/frontend/views/align/components/annotations/annotation.form.js
index 9b02478..db56bcd 100644
--- a/animism-align/frontend/views/align/components/annotations/annotation.form.js
+++ b/animism-align/frontend/views/align/components/annotations/annotation.form.js
@@ -57,12 +57,8 @@ class AnnotationForm extends Component {
top: timeToPosition(data.start_ts, timeline),
}}
>
- <div>
- <textarea
- value={data.text}
- onChange={this.handleChange}
- />
- </div>
+ {data.type === 'sentence' && this.renderTextarea()}
+ {data.type === 'heading' && this.renderTextarea()}
<div className='row'>
<Select
name='type'
@@ -76,6 +72,16 @@ class AnnotationForm extends Component {
</div>
)
}
+ renderTextarea() {
+ return (
+ <div>
+ <textarea
+ value={data.text}
+ onChange={this.handleChange}
+ />
+ </div>
+ )
+ }
}