Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Commit 7a0e0c1

Browse files
author
Adam Haglund
authored
change key for start/pause timer (#17)
1 parent d09b098 commit 7a0e0c1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class AppComponent extends React.Component<IStateProps & DispatchProps> {
4949
this.resetTimer = this.resetTimer.bind(this)
5050
}
5151

52-
@keydown('space')
52+
@keydown('p')
5353
private toggleTimer() {
5454
this.props.counting ? this.props.stopTimer() : this.props.startTimer()
5555
}

src/components/KeyboardShortcutsDialog.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { hot } from 'react-hot-loader'
22
import * as React from 'react'
33
import { DialogContainer } from 'react-md/lib/Dialogs'
4-
import { FontIcon } from 'react-md/lib/FontIcons'
54
import styled from 'styled-components'
65

76
const Instruction = styled.div`
@@ -43,8 +42,8 @@ class KeyboardShortcutsDialogComponent extends React.PureComponent<IProps> {
4342
actions={this.actions}
4443
onHide={this.props.hide}
4544
>
46-
<Instruction title="Spacebar">
47-
<FontIcon>space_bar</FontIcon> Start / pause the timer
45+
<Instruction title="P">
46+
<Key>P</Key> Start / pause the timer
4847
</Instruction>
4948

5049
<Instruction title="R">

0 commit comments

Comments
 (0)