質問編集履歴
1
誤字、文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,11 +56,11 @@
|
|
56
56
|
|
57
57
|
class App extends Component{
|
58
58
|
|
59
|
-
|
59
|
+
|
60
60
|
|
61
61
|
data = [];
|
62
62
|
|
63
|
-
|
63
|
+
|
64
64
|
|
65
65
|
msgStyle = {
|
66
66
|
|
@@ -114,7 +114,7 @@
|
|
114
114
|
|
115
115
|
this.doshapeA = this.doshapeA.bind(this);
|
116
116
|
|
117
|
-
this.doshape
|
117
|
+
this.doshapeB = this.doshapeB.bind(this);
|
118
118
|
|
119
119
|
}
|
120
120
|
|
@@ -140,13 +140,13 @@
|
|
140
140
|
|
141
141
|
doshapeA(){
|
142
142
|
|
143
|
-
this.setState(
|
143
|
+
this.setState({
|
144
144
|
|
145
145
|
flgA: true,
|
146
146
|
|
147
147
|
flgB: false
|
148
148
|
|
149
|
-
})
|
149
|
+
});
|
150
150
|
|
151
151
|
}
|
152
152
|
|
@@ -180,7 +180,7 @@
|
|
180
180
|
|
181
181
|
//ここでtrue falseを判定
|
182
182
|
|
183
|
-
const input = (this.state.flgA) ? <div style={s}>
|
183
|
+
const input = (this.state.flgA) ? <div style={s}><i class="fa fa-heart">A</i></div> : <div style={s}>図形B<i class="fa fa-star">い</i></div>;
|
184
184
|
|
185
185
|
return <div>{input}</div>;
|
186
186
|
|