div data-mine this props mine true null header User avatar user User D

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
`<div data-mine={this.props.mine ? true : null}>
<header>
<User avatar="s">{c.user}</User>
<Datetime>{c.createdOn}</Datetime>
<Score>{c.score}</Score>
</header>
<article>{c.text}</article>
{this.props.mine ?
<footer>
<Button onClick={this._onEdit} text="Edit" />
{ this.state.edit ?
<CommentForm ref="form"
buttonText="Save"
score={c.score}
text={c.text}
onSubmit={this._onSubmit}
/>
: null }
<Button onClick={this._onDelete} text="Delete" />
</footer>
: null }
</div>`