Giter Site home page Giter Site logo

react-timer's People

Contributors

dependabot[bot] avatar dowhilegeek avatar funcodingpanda avatar jameszmartin avatar michaelgichia avatar svnm avatar tungnt92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-timer's Issues

Remove action buttons out of component. Is this already possible?

Hi, Great work,

I suggest specializing this component to only show the timer. Remove action buttons out of component and allow developer full custom control of component start, stop and reset actions. Is this possible?

I will already have to do this in order to have better control of the start, reset, and stop buttons for a mobile app that will have those buttons on a specialized footer. Let me know your thoughts on this and whether it is pull request worthy. If not, no worries, I will customize myself for my needs.

Great component, keep it simple and Thanks for your contribution.

Receiving Error when using `TestComponent`

When I run the TestComponent example from README.md I'm receiving a Syntax Error @ line 7:6:

let OPTIONS = { ... }

Here's the full code:

import Dropdown from 'react-timer'
import ReactDOM from 'react-dom'
import React, { Component, PropTypes } from 'react'

class TestComponent extends Component {
  /* delay is just the delay on showing the update of the timer */
  let OPTIONS = { prefix: 'seconds elapsed!', delay: 100}
  render () {
    return (
      <div>
        <Timer options={OPTIONS} />
      </div>
    )
  }
}

ReactDOM.render( <TestComponent />, document.getElementById('root') )

I had to make a few edits to TestComponent in order for the code to compile successfully. Am I missing something?

My changes to TestComponent:

import Timer from 'react-timer';
import ReactDOM from 'react-dom';
import React, { Component } from 'react';

class TestComponent extends Component {
  /* delay is just the delay on showing the update of the timer */
	constructor(props) {
		super(props);

		this.state = {
			options: {
				prefix: 'seconds elapsed!',
				delay: 100
			}
		}
	}

  render () {
    return (
      <div>
        <Timer options={this.state.options} />
      </div>
    )
  }
}

ReactDOM.render( <TestComponent />, document.getElementById('app') );

Let me know what you think, if I'm incorrect in my assumption, or if I'm not reading the example correctly.

Thanks!

Add a demo

You should add a demo, then people can quickly see if this is what they want.

[Request] Props for time already lapsed

Hi,

I'd like to be able to save how many seconds have passed. For example, I might send this value to my server. Then when the timer loads, it could put "Seconds Passed" into props.

Is this feature possible?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.