Skip to content

Commit

Permalink
Remove parentheses from JSX in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
kuy committed Sep 14, 2016
1 parent f05fe7a commit 5d2e9d8
Showing 1 changed file with 19 additions and 32 deletions.
51 changes: 19 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@ import { Tooltip } from 'redux-tooltip';
class App extends React.Component {
render() {
return (
<div>
<Page />
<Tooltip>
Hello Tooltip!
</Tooltip>
</div>
);
return <div>
<Page />
<Tooltip>
Hello Tooltip!
</Tooltip>
</div>;
}
}
```
Expand All @@ -79,11 +77,9 @@ import { Origin } from 'redux-tooltip';
class Page extends React.Component {
render() {
return (
<p>
Please hover <Origin>here</Origin>.
</p>
);
return <p>
Please hover <Origin>here</Origin>.
</p>;
}
}
```
Expand Down Expand Up @@ -156,27 +152,23 @@ For advanced usage, you can override the default handlers; `onMouseEnter` and `o
// Invalid SVG...
// Origin component wraps children with <span> tag in default.
function Shape() {
return (
<svg width="80" height="80">
<Origin>
<rect x="10" y="10" width="20" height="30" />
</Origin>
</svg>
);
return <svg width="80" height="80">
<Origin>
<rect x="10" y="10" width="20" height="30" />
</Origin>
</svg>;
}
// Perfect!
// Origin.wrapBy() method can be used to create customized Origin component which wraps with your favorite tag.
const SVGOrigin = Origin.wrapBy('g');
function Shape() {
return (
<svg width="80" height="80">
<SVGOrigin>
<rect x="10" y="10" width="20" height="30" />
</SVGOrigin>
</svg>
);
return <svg width="80" height="80">
<SVGOrigin>
<rect x="10" y="10" width="20" height="30" />
</SVGOrigin>
</svg>;
}
```

Expand Down Expand Up @@ -243,11 +235,6 @@ If you prefer 'single-run', which means that the browser is closed after testing
npm run test:feature:ci
```

### TODO

+ Introduce ESLint
+ API documentation using ESDoc

## Changelog

See the [Releases](https://github.com/kuy/redux-tooltip/releases) page on GitHub.
Expand Down

0 comments on commit 5d2e9d8

Please sign in to comment.