ssanjun / react-swing

react-swing is a React component for implementing swing
http://ssanjun.github.io/examples/react-swing/
Other
40 stars 18 forks source link

Configuration options around allowed directions #16

Closed gingeranyhow closed 5 years ago

gingeranyhow commented 6 years ago

Hi,

Adding allowed directions to the configuration object throws type errors around Direction being undefined. Do you know if this configuration option is allowed? Thanks!

    ```
        <Swing
                    className="stack"
                    tagName="div"
                    setStack={(stack)=> this.setState({stack:stack})}
                    ref="stack"
                    config={
                      allowedDirections:[Direction.LEFT]}
                    throwout={(e)=>console.log('throwout',e)}
                >
CasperEngl commented 6 years ago

Use https://github.com/gajus/swing in your project and then: import { Direction } from 'swing';