Browse Source

Update components-and-props.md

fb indent style
main
Christopher Chedeau 8 years ago
committed by GitHub
parent
commit
501974fc8a
  1. 8
      docs/components-and-props.md

8
docs/components-and-props.md

@ -134,7 +134,8 @@ function Comment(props) {
<div className="UserInfo">
<img className="Avatar"
src={props.author.avatarUrl}
alt={props.author.name} />
alt={props.author.name}
/>
<div className="UserInfo-name">
{props.author.name}
</div>
@ -158,12 +159,13 @@ This component can be tricky to change because of all the nesting, and it is als
First, we will extract `Avatar`:
```js{3-5}
```js{3-6}
function Avatar(props) {
return (
<img className="Avatar"
src={props.user.avatarUrl}
alt={props.user.name} />
alt={props.user.name}
/>
);
}
```

Loading…
Cancel
Save