React native bottom drawer component
Install react-native-bdrawer
.
yarn add react-native-bdrawer
(go to the example folder for a more fleshed out example)
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import BottomDrawer from 'react-native-bdrawer';
class Example extends Component {
render() {
return (
<View>
<TouchableOpacity onPress={() => this.refs.Drawer.open()}>
<Text>Open Drawer</Text>
</TouchableOpacity>
<BottomDrawer ref="Drawer" containerHeight={300}>
<Text>Hello</Text>
</BottomDrawer>
</View>
)
}
}
Prop | Type | Default | Description |
---|---|---|---|
containerHeight | number | -- | The height of the drawer. |
backgroundColor | string | '#f5f7f9' | The background color of the drawer. |