Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 999fe3b

Browse files
lasota-piotrljharb
authored andcommitted
Change className to variant in examples
1 parent dbdf8ea commit 999fe3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

react/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,15 +400,15 @@
400400
```jsx
401401
// bad
402402
render() {
403-
return <MyComponent className="long body" foo="bar">
403+
return <MyComponent variant="long body" foo="bar">
404404
<MyChild />
405405
</MyComponent>;
406406
}
407407
408408
// good
409409
render() {
410410
return (
411-
<MyComponent className="long body" foo="bar">
411+
<MyComponent variant="long body" foo="bar">
412412
<MyChild />
413413
</MyComponent>
414414
);
@@ -427,10 +427,10 @@
427427

428428
```jsx
429429
// bad
430-
<Foo className="stuff"></Foo>
430+
<Foo variant="stuff"></Foo>
431431
432432
// good
433-
<Foo className="stuff" />
433+
<Foo variant="stuff" />
434434
```
435435

436436
- If your component has multi-line properties, close its tag on a new line. eslint: [`react/jsx-closing-bracket-location`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md)

0 commit comments

Comments
 (0)