increaser-timepicker
Demo
Install
npm install --save increaser-timepicker
Usage
import React from 'react'
import TimePicker from 'increaser-timepicker'
const Container = ({ children }) => (
<div style={{ height: '100vh' width: '100%' }}>
{children}
</div>
)
// optional
const theme = {
actionColor: 'rgba(231, 76, 60,.9)',
selectColor: '#ecf0f1',
selectTextColor: '#34495e',
circleColor: 'rgba(255, 255, 255, 0.15)'
}
class Example extends React.Component {
constructor(props) {
super(props)
this.state = { duration: 25 }
}
render() {
const { duration } = this.state
return (
<TimePicker
theme={theme}
duration={duration}
wrapper={Container}
onStart={() => console.log('Start!')}
onDurationChange={duration => this.setState({ duration })}
/>
)
}
}
Story on Medium
License
MIT © RodionChachura