1.0.9 • Published 4 years ago

@iyaroslav/play-pause-button v1.0.9

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

play-pause-button

YouTube like responsive play/pause button

Made with create-react-library

NPM JavaScript Style Guide

Install

yarn add @iyaroslav/play-pause-button
# or
npm install --save @iyaroslav/play-pause-button

Intro

Usage

Demo

import React, { Component } from 'react'

import PlayButton from '@iyaroslav/play-pause-button'
import '@iyaroslav/play-pause-button/dist/index.css'

class Example extends Component {
  const buttonRef = useRef(null)

  // buttonRef.play()
  // buttonRef.pause()
  // buttonRef.toggle()
  // buttonRef.isPaused()

  render() {
    return <PlayButton
        ref={buttonRef}
        onPlay={() => {}}
        onPause={() => {}}
        onToggle={() => {}}
    />
  }
}

License

MIT © iYaroslav

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago