Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let user know the rosh timer has been copied to clipboard in an elegant manner, needs styling #7

Open
cadenforrest opened this issue Apr 22, 2021 · 0 comments
Assignees

Comments

@cadenforrest
Copy link
Owner

cadenforrest commented Apr 22, 2021

Relevant code In Timer.js:

handleCopiedMessage(){
    this.setState({
      showCopiedMessage: true
    }); 
    setTimeout(()=>{
      this.setState({
        showCopiedMessage: false
      }); 
    }, 2000); 
  }
...
render(){
...
    let rosh = this.state.isOn ? (
      <div className={this.state.focused ? "focused" : ""}>
        {this.state.showCopiedMessage && <p>Copied to clipboard!</p>}
        <button
          onClick={() => this.handleRoshClick()}
          autoFocus
          ref={(c) => (this._input = c)}
        >
          {" "}
          Rosh died!{" "}
        </button>
      </div>
    ) : null;
}
@cadenforrest cadenforrest created this issue from a note in stuff to work on (To do) Apr 22, 2021
@cadenforrest cadenforrest moved this from To do to In progress in stuff to work on Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
stuff to work on
In progress
Development

No branches or pull requests

2 participants