update doc with example for JSX Brackets config (#4455)

* update doc with example for JSX Brackets config

* Put ignore comment before code blocks

* Make Prettier happy
master
Hozefa 2018-05-10 06:07:52 -07:00 committed by Lipis
parent 6447d30b0b
commit b504e79113
1 changed files with 27 additions and 0 deletions

View File

@ -94,6 +94,33 @@ Valid options:
Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
Valid options:
* `true` - Example:
<!-- prettier-ignore -->
```
<button
className="prettier-class"
id="prettier-id"
onClick={this.handleClick}>
Click Here
</button>
```
* `false` - Example:
<!-- prettier-ignore -->
```
<button
className="prettier-class"
id="prettier-id"
onClick={this.handleClick}
>
Click Here
</button>
```
| Default | CLI Override | API Override |
| ------- | ------------------------- | ---------------------------- |
| `false` | `--jsx-bracket-same-line` | `jsxBracketSameLine: <bool>` |