easy covering layer that moved by touching. demo
yarn add react-shut
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>
ShutFromTop
ShutFromBottom
ShutFromLeft
ShutFromRight
passed { fn }
as props. fn()
start quit animation.
about mounting with shut-animation.
Their behavior can be confirmed in demo's console.