Skip to content

Commit 805639a

Browse files
author
Jason Antwi-Appah
committed
chore: class -> className
1 parent 4362ae0 commit 805639a

File tree

3 files changed

+66
-67
lines changed

3 files changed

+66
-67
lines changed

frameworks/keyed/million-react/src/App.jsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -131,65 +131,65 @@ export default function App() {
131131
<div className="container">
132132
<div className="jumbotron">
133133
<div className="row">
134-
<div class="col-md-6">
134+
<div className="col-md-6">
135135
<h1>Million React keyed</h1>
136136
</div>
137-
<div class="col-md-6">
138-
<div class="row">
139-
<div class="col-sm-6 smallpad">
137+
<div className="col-md-6">
138+
<div className="row">
139+
<div className="col-sm-6 smallpad">
140140
<button
141141
type="button"
142-
class="btn btn-primary btn-block"
142+
className="btn btn-primary btn-block"
143143
id="run"
144144
onClick={create1k}
145145
>
146146
Create 1,000 rows
147147
</button>
148148
</div>
149-
<div class="col-sm-6 smallpad">
149+
<div className="col-sm-6 smallpad">
150150
<button
151151
type="button"
152-
class="btn btn-primary btn-block"
152+
className="btn btn-primary btn-block"
153153
id="runlots"
154154
onClick={create10k}
155155
>
156156
Create 10,000 rows
157157
</button>
158158
</div>
159-
<div class="col-sm-6 smallpad">
159+
<div className="col-sm-6 smallpad">
160160
<button
161161
type="button"
162-
class="btn btn-primary btn-block"
162+
className="btn btn-primary btn-block"
163163
id="add"
164164
onClick={append1k}
165165
>
166166
Append 1,000 rows
167167
</button>
168168
</div>
169-
<div class="col-sm-6 smallpad">
169+
<div className="col-sm-6 smallpad">
170170
<button
171171
type="button"
172-
class="btn btn-primary btn-block"
172+
className="btn btn-primary btn-block"
173173
id="update"
174174
onClick={updateEvery10}
175175
>
176176
Update every 10th row
177177
</button>
178178
</div>
179-
<div class="col-sm-6 smallpad">
179+
<div className="col-sm-6 smallpad">
180180
<button
181181
type="button"
182-
class="btn btn-primary btn-block"
182+
className="btn btn-primary btn-block"
183183
id="clear"
184184
onClick={clear}
185185
>
186186
Clear
187187
</button>
188188
</div>
189-
<div class="col-sm-6 smallpad">
189+
<div className="col-sm-6 smallpad">
190190
<button
191191
type="button"
192-
class="btn btn-primary btn-block"
192+
className="btn btn-primary btn-block"
193193
id="swaprows"
194194
onClick={swapRows}
195195
>
@@ -214,7 +214,7 @@ export default function App() {
214214
</tbody>
215215
</table>
216216
<span
217-
class="preloadicon glyphicon glyphicon-remove"
217+
className="preloadicon glyphicon glyphicon-remove"
218218
aria-hidden="true"
219219
></span>
220220
</div>
@@ -224,16 +224,16 @@ export default function App() {
224224
function Row({ item, remove, selected, setSelected }) {
225225
return (
226226
<tr className={selected === item.id ? 'danger' : ''}>
227-
<td class="col-md-1">{item.id}</td>
228-
<td class="col-md-4">
227+
<td className="col-md-1">{item.id}</td>
228+
<td className="col-md-4">
229229
<a onClick={() => setSelected(item.id)}>{item.label}</a>
230230
</td>
231-
<td class="col-md-1">
231+
<td className="col-md-1">
232232
<a onClick={() => remove(item.id)}>
233-
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
233+
<span className="glyphicon glyphicon-remove" aria-hidden="true"></span>
234234
</a>
235235
</td>
236-
<td class="col-md-6" />
236+
<td className="col-md-6" />
237237
</tr>
238238
);
239239
}

frameworks/keyed/million/src/main.jsx

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ function rerender() {
130130
<div className="container">
131131
<div className="jumbotron">
132132
<div className="row">
133-
<div class="col-md-6">
133+
<div className="col-md-6">
134134
<h1>Million keyed</h1>
135135
</div>
136-
<div class="col-md-6">
137-
<div class="row">
138-
<div class="col-sm-6 smallpad">
136+
<div className="col-md-6">
137+
<div className="row">
138+
<div className="col-sm-6 smallpad">
139139
<button
140140
type="button"
141-
class="btn btn-primary btn-block"
141+
className="btn btn-primary btn-block"
142142
id="run"
143143
onClick={() => {
144144
create1k();
@@ -147,10 +147,10 @@ function rerender() {
147147
Create 1,000 rows
148148
</button>
149149
</div>
150-
<div class="col-sm-6 smallpad">
150+
<div className="col-sm-6 smallpad">
151151
<button
152152
type="button"
153-
class="btn btn-primary btn-block"
153+
className="btn btn-primary btn-block"
154154
id="runlots"
155155
onClick={() => {
156156
create10k();
@@ -159,10 +159,10 @@ function rerender() {
159159
Create 10,000 rows
160160
</button>
161161
</div>
162-
<div class="col-sm-6 smallpad">
162+
<div className="col-sm-6 smallpad">
163163
<button
164164
type="button"
165-
class="btn btn-primary btn-block"
165+
className="btn btn-primary btn-block"
166166
id="add"
167167
onClick={() => {
168168
append1k();
@@ -171,10 +171,10 @@ function rerender() {
171171
Append 1,000 rows
172172
</button>
173173
</div>
174-
<div class="col-sm-6 smallpad">
174+
<div className="col-sm-6 smallpad">
175175
<button
176176
type="button"
177-
class="btn btn-primary btn-block"
177+
className="btn btn-primary btn-block"
178178
id="update"
179179
onClick={() => {
180180
updateEvery10();
@@ -183,10 +183,10 @@ function rerender() {
183183
Update every 10th row
184184
</button>
185185
</div>
186-
<div class="col-sm-6 smallpad">
186+
<div className="col-sm-6 smallpad">
187187
<button
188188
type="button"
189-
class="btn btn-primary btn-block"
189+
className="btn btn-primary btn-block"
190190
id="clear"
191191
onClick={() => {
192192
clear();
@@ -195,10 +195,10 @@ function rerender() {
195195
Clear
196196
</button>
197197
</div>
198-
<div class="col-sm-6 smallpad">
198+
<div className="col-sm-6 smallpad">
199199
<button
200200
type="button"
201-
class="btn btn-primary btn-block"
201+
className="btn btn-primary btn-block"
202202
id="swaprows"
203203
onClick={() => {
204204
swapRows();
@@ -217,25 +217,24 @@ function rerender() {
217217
<Row
218218
key={item.id}
219219
item={item}
220-
selected={selected}
221220
remove={remove}
222221
/>
223222
))}
224223
</tbody>
225224
</table>
226225
<span
227-
class="preloadicon glyphicon glyphicon-remove"
226+
className="preloadicon glyphicon glyphicon-remove"
228227
aria-hidden="true"
229228
></span>
230229
</div>
231230
);
232231
}
233232

234-
function Row({ item, selected, remove }) {
233+
function Row({ item, remove }) {
235234
return (
236235
<tr className={selected === item.id ? 'danger' : ''}>
237-
<td class="col-md-1">{item.id}</td>
238-
<td class="col-md-4">
236+
<td className="col-md-1">{item.id}</td>
237+
<td className="col-md-4">
239238
<a
240239
onClick={() => {
241240
selected = item.id;
@@ -245,16 +244,16 @@ function Row({ item, selected, remove }) {
245244
{item.label}
246245
</a>
247246
</td>
248-
<td class="col-md-1">
247+
<td className="col-md-1">
249248
<a
250249
onClick={() => {
251250
remove(item.id);
252251
}}
253252
>
254-
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
253+
<span className="glyphicon glyphicon-remove" aria-hidden="true"></span>
255254
</a>
256255
</td>
257-
<td class="col-md-6" />
256+
<td className="col-md-6" />
258257
</tr>
259258
);
260259
}

frameworks/non-keyed/million/src/main.jsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ function rerender() {
130130
<div className="container">
131131
<div className="jumbotron">
132132
<div className="row">
133-
<div class="col-md-6">
133+
<div className="col-md-6">
134134
<h1>Million</h1>
135135
</div>
136-
<div class="col-md-6">
137-
<div class="row">
138-
<div class="col-sm-6 smallpad">
136+
<div className="col-md-6">
137+
<div className="row">
138+
<div className="col-sm-6 smallpad">
139139
<button
140140
type="button"
141-
class="btn btn-primary btn-block"
141+
className="btn btn-primary btn-block"
142142
id="run"
143143
onClick={() => {
144144
create1k();
@@ -147,10 +147,10 @@ function rerender() {
147147
Create 1,000 rows
148148
</button>
149149
</div>
150-
<div class="col-sm-6 smallpad">
150+
<div className="col-sm-6 smallpad">
151151
<button
152152
type="button"
153-
class="btn btn-primary btn-block"
153+
className="btn btn-primary btn-block"
154154
id="runlots"
155155
onClick={() => {
156156
create10k();
@@ -159,10 +159,10 @@ function rerender() {
159159
Create 10,000 rows
160160
</button>
161161
</div>
162-
<div class="col-sm-6 smallpad">
162+
<div className="col-sm-6 smallpad">
163163
<button
164164
type="button"
165-
class="btn btn-primary btn-block"
165+
className="btn btn-primary btn-block"
166166
id="add"
167167
onClick={() => {
168168
append1k();
@@ -171,10 +171,10 @@ function rerender() {
171171
Append 1,000 rows
172172
</button>
173173
</div>
174-
<div class="col-sm-6 smallpad">
174+
<div className="col-sm-6 smallpad">
175175
<button
176176
type="button"
177-
class="btn btn-primary btn-block"
177+
className="btn btn-primary btn-block"
178178
id="update"
179179
onClick={() => {
180180
updateEvery10();
@@ -183,10 +183,10 @@ function rerender() {
183183
Update every 10th row
184184
</button>
185185
</div>
186-
<div class="col-sm-6 smallpad">
186+
<div className="col-sm-6 smallpad">
187187
<button
188188
type="button"
189-
class="btn btn-primary btn-block"
189+
className="btn btn-primary btn-block"
190190
id="clear"
191191
onClick={() => {
192192
clear();
@@ -195,10 +195,10 @@ function rerender() {
195195
Clear
196196
</button>
197197
</div>
198-
<div class="col-sm-6 smallpad">
198+
<div className="col-sm-6 smallpad">
199199
<button
200200
type="button"
201-
class="btn btn-primary btn-block"
201+
className="btn btn-primary btn-block"
202202
id="swaprows"
203203
onClick={() => {
204204
swapRows();
@@ -214,23 +214,23 @@ function rerender() {
214214
<table className="table table-hover table-striped test-data">
215215
<tbody>
216216
{list.map((item) => (
217-
<Row item={item} selected={selected} remove={remove} />
217+
<Row item={item} remove={remove} />
218218
))}
219219
</tbody>
220220
</table>
221221
<span
222-
class="preloadicon glyphicon glyphicon-remove"
222+
className="preloadicon glyphicon glyphicon-remove"
223223
aria-hidden="true"
224224
></span>
225225
</div>
226226
);
227227
}
228228

229-
function Row({ item, selected, remove }) {
229+
function Row({ item, remove }) {
230230
return (
231231
<tr className={selected === item.id ? 'danger' : ''}>
232-
<td class="col-md-1">{item.id}</td>
233-
<td class="col-md-4">
232+
<td className="col-md-1">{item.id}</td>
233+
<td className="col-md-4">
234234
<a
235235
onClick={() => {
236236
selected = item.id;
@@ -240,16 +240,16 @@ function Row({ item, selected, remove }) {
240240
{item.label}
241241
</a>
242242
</td>
243-
<td class="col-md-1">
243+
<td className="col-md-1">
244244
<a
245245
onClick={() => {
246246
remove(item.id);
247247
}}
248248
>
249-
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
249+
<span className="glyphicon glyphicon-remove" aria-hidden="true"></span>
250250
</a>
251251
</td>
252-
<td class="col-md-6" />
252+
<td className="col-md-6" />
253253
</tr>
254254
);
255255
}

0 commit comments

Comments
 (0)