@betterthings/scissors
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Scissors by Better Things Digital

Dependencies

You need to install react and immutable yourself.

Example

import { Scissors, ScissorsState } from '@betterthings/scissors'

class App extends React.Component {
  constructor(props) {
    super(props)

    this.state = {
      scissorsState: new ScissorsState({ imageUrl: '/path/to/img.jpg' }),
    }

    this.onScissorsChange = this.onScissorsChange.bind(this)
  }

  onScissorsChange(scissorsState) {
    this.setState({ scissorsState })
  }

  render() {
    return (
      <Scissors
        scissors={this.state.scissorsState}
        onChange={this.onScissorsChange}
      />
    )
  }
}

Package Sidebar

Install

npm i @betterthings/scissors

Weekly Downloads

377

Version

0.0.7

License

MIT

Unpacked Size

181 kB

Total Files

17

Last publish

Collaborators

  • laooola
  • lusbuab