react-shut
v2.0.0
Published
easy covering layer that moved by touching
Downloads
2
Readme
react-shut
easy covering layer that moved by touching. demo
Installation
yarn add react-shut
Usage
import { ShutFromRight as Shut } from 'react-shut'
const mountWithShut = true
const Quit = props => <div onClick={props.fn} />
export default props =>
<Shut {...{
mountWithShut,
Quit,
onQuitEnd: (e) => {}
}}>
{props.children}
</Shut>
Components
ShutFromTop
ShutFromBottom
ShutFromLeft
ShutFromRight
Props
Quit: React$Component
passed { fn }
as props. fn()
start quit animation.
mountWithShut: boolean
about mounting with shut-animation.
onComeEnd/onQuitEnd: (e) => {}
Their behavior can be confirmed in demo's console.
background: string
duration: number
touchRatio: number
quitRatio: number
notScroll: boolean
License
MIT (http://opensource.org/licenses/MIT)