1.1.2 • Published 4 years ago

react-touch-drawer v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

React Touch Bottom Drawer with native touch (react-touch-drawer)

npm.io

###Installation and usage

####Inline code The easiest way to use react-touch-drawer is to install it from npm and build it into your app with Webpack.

$ npm install react-touch-drawer

####Then use it in your app:

import ReactTouchDrawer from 'react-touch-drawer';

const drawerHeight=200
function App() {
    return (  
            <ReactTouchDrawer 
                heightSet={drawerHeight} 
                drawerComponent={
                   ({close,open})=>( <div style={{backgroundColor: "blue",height:drawerHeight+'px'}}>hello</div>)
                }
            >
                {
                    ({close,open})=>(
                        <div className="" style={{background:'red',height:'110vh'}}>
                            <div onClick={open}>open</div>
                            <div onClick={close}>close</div>
                        </div>
                    )
                }
               
            </ReactTouchDrawer>
    )
  }
export default App;

###Props

NamePropsvalue
heightSet300 (default)number
drawerComponentcomponentreact componnet
bodyAnimationfalsebool
drawerBGrgba(0,0,0,.2) (default)color(hex,rgba)
drawerContainerBgwhite (default)color(hex,rgba)
drawerWidthstring"80%""100vh""100px"
enabledtruebool (Stop touch gesture)

MADE WITH LOVE

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago