Skip to content

Commit 9336017

Browse files
committed
Create CommentForm.jsx
1 parent b18becb commit 9336017

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from 'react';
2+
3+
class CommentForm extends React.Component {
4+
render() {
5+
return (
6+
<form method="post" action={this.props.url}>
7+
<input type="hidden" name="_xsrf" value={this.props.xsrf}/>
8+
<h2>Submit a comment</h2>
9+
<div className="form-group">
10+
<label>
11+
Your hello
12+
<input name="author" type="text" className="form-control" placeholder="..." />
13+
</label>
14+
</div>
15+
<div className="form-group">
16+
<label>
17+
Say something...
18+
<textarea name="text" className="form-control" placeholder="..." />
19+
</label>
20+
</div>
21+
<div className="text-right">
22+
<button type="reset" className="btn btn-default">Reset</button>
23+
<button type="submit" className="btn btn-primary">Submit</button>
24+
</div>
25+
</form>
26+
);
27+
}
28+
}
29+
30+
export default CommentForm;

0 commit comments

Comments
 (0)