mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
Change className to variant in examples
This commit is contained in:
committed by
Jordan Harband
parent
dbdf8ea0ef
commit
999fe3b83a
@@ -400,7 +400,7 @@
|
||||
```jsx
|
||||
// bad
|
||||
render() {
|
||||
return <MyComponent className="long body" foo="bar">
|
||||
return <MyComponent variant="long body" foo="bar">
|
||||
<MyChild />
|
||||
</MyComponent>;
|
||||
}
|
||||
@@ -408,7 +408,7 @@
|
||||
// good
|
||||
render() {
|
||||
return (
|
||||
<MyComponent className="long body" foo="bar">
|
||||
<MyComponent variant="long body" foo="bar">
|
||||
<MyChild />
|
||||
</MyComponent>
|
||||
);
|
||||
@@ -427,10 +427,10 @@
|
||||
|
||||
```jsx
|
||||
// bad
|
||||
<Foo className="stuff"></Foo>
|
||||
<Foo variant="stuff"></Foo>
|
||||
|
||||
// good
|
||||
<Foo className="stuff" />
|
||||
<Foo variant="stuff" />
|
||||
```
|
||||
|
||||
- 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)
|
||||
|
||||
Reference in New Issue
Block a user