React based implementation of mobile terminal adsorption suspension button

Preview address (mobile terminal) :

Kkfor. Making. IO/suspend – but…

Source code address:

Github.com/kkfor/suspe…

The installation

npm install suspend-button -S
Copy the code

use

import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import SuspendButton from 'suspend-button'

class App extends Component {
  render() {
    return (
      <SuspendButton></SuspendButton>
    )
  }
}

ReactDOM.render(
  <App />,
  document.getElementById('root')
)
Copy the code