simple-play-button
v1.0.1
Published
A simple play button
Downloads
3
Readme
simple-play-button
A simple play button
Install
npm install --save simple-play-button
Usage
import React, { Component } from 'react'
import PlayButton from 'simple-play-button'
class Example extends Component {
render () {
return (
<PlayButton src={'some_audio_source'}/>
)
}
}
Customization
<PlayButton src={'some_audio_source'} custom>
{({playOrPause, isPlaying}) => (
<div onClick={playOrPause}>
{!isPlaying ? <div>custom play</div> : <div>custom pause</div>}
</div>
)}
</PlayButton>
License
MIT © jm-riley