Skip to content

Commit

Permalink
Update demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 20, 2019
1 parent 790b7de commit 571befa
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions demo/src/index.js
Expand Up @@ -39,8 +39,8 @@ class Demo extends Component {
<h1 style={{ padding: "0px 0px 0px" }}>react-hotkeys</h1>
<div>
<a href="https://travis-ci.org/jaywcjlove/react-hotkeys"><img src="https://travis-ci.org/jaywcjlove/react-hotkeys.svg?branch=master" /></a>&nbsp;
<a href="https://www.npmjs.org/package/react-hot-keys"><img src="https://img.shields.io/npm/v/react-hot-keys.svg" /></a>&nbsp;
<a href="https://coveralls.io/github/jaywcjlove/react-hotkeys"><img src="https://img.shields.io/coveralls/jaywcjlove/react-hotkeys/master.svg" /></a>
<a href="https://www.npmjs.org/package/react-hot-keys"><img src="https://img.shields.io/npm/v/react-hot-keys.svg" /></a>&nbsp;
<a href="https://coveralls.io/github/jaywcjlove/react-hotkeys"><img src="https://img.shields.io/coveralls/jaywcjlove/react-hotkeys/master.svg" /></a>
</div>
<p style={{ padding: "10px 0px 0px" }}>
React component to listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts.
Expand All @@ -51,11 +51,9 @@ class Demo extends Component {
</div>
</Example>
)}
<button onClick={() => {
this.setState({
mount: !this.state.mount,
});
}}>{mount ? 'Unmount Component' :'Mount Component'}</button>
<button onClick={() => this.setState({ mount: !this.state.mount })} >
{mount ? 'Unmount Component' :'Mount Component'}
</button>
</div>
)
}
Expand Down

0 comments on commit 571befa

Please sign in to comment.