1.0.6 • Published 2 years ago

enhanced-rn-bottom-drawer v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

enhanced-rn-bottom-drawer

A react-native bottom drawer component

"To all the people who sucks in front-end" cit.

Installation

npm install enhanced-rn-bottom-drawer

or install with yarn

yarn add enhanced-rn-bottom-drawer

Usage

import { BottomDrawer } from "enhanced-rn-bottom-drawer";

type Props extends ViewProps;

export const DrawerContainer: React.FC<Props> = ({children})=> {
  return (
    <BottomDrawer
      isVisible={/* visibleProp from redux for example */}
      closeAction={()=> {/* close action from redux for example */}}
    >
      {children}
      {children}
      {children}
    </BottomDrawer>
  )
}

Import

import { BottomDrawer } from "enhanced-rn-bottom-drawer";

type Props extends ViewProps;

export const App = ()=> {
return (
    <SafeAreaView style={styles.safeAreaStyle}>
      <NavigationContainer theme={containerTheme}>
        <RootStack />
      </NavigationContainer>
      <DrawerContainer />
    </SafeAreaView>
  );
}

Props

PropsTypeDefaultDescription
isVisiblebooleanREQUIREDnone
closeActionvoidREQUIREDnone
openDurationnumber500time of the animation to open drawer
closeDurationnumber500time of the animation to close drawer
minHeightnumber300minimum height of the drawer
maxHeightnumberScreenHeight - 75maximum height of the drawer
notchBarbooleantruenotch-bar on the header of the drawer
notchColorColorValue#0000color of the notch bar
backGroundColorColorValue#0000background color of the drawer

License

MIT


1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago