Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions types/react-native-drawer/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Type definitions for react-native-drawer 2.3
// Type definitions for react-native-drawer 2.5
// Project: https://github.com/root-two/react-native-drawer
// Definitions by: jnbt <https://github.com/jnbt>
// suniahk <https://github.com/suniahk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6

Expand Down Expand Up @@ -108,6 +109,10 @@ export interface DrawerProperties {
* Callback fired at the start of an open animation
*/
onOpenStart?(): void;
/**
* Callback fired when a drag gesture starts.
*/
onDragStart?(): void;
/**
* Will be called immediately after the drawer has entered the closed state
*/
Expand Down Expand Up @@ -137,6 +142,10 @@ export interface DrawerProperties {
* disable the drawer while still allowing programmatic control
*/
acceptPan?: boolean;
/**
* Allow Pan when drawer is 'open'
*/
acceptPanOnDrawer?: boolean;
/**
* Same as acceptTap, except only for close
*/
Expand Down Expand Up @@ -167,7 +176,7 @@ export interface DrawerProperties {
/**
* which side the drawer should be on.
*/
side?: 'left' | 'right';
side?: 'left' | 'right' | 'top' | 'bottom';
/**
* if true will run InteractionManager for open/close animations.
*/
Expand Down
3 changes: 3 additions & 0 deletions types/react-native-drawer/react-native-drawer-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class DrawerTest extends React.Component<{}, {open: boolean}> {
onClose={this.onClose}
closedDrawerOffset={100}
openDrawerOffset={(viewport: ScaledSize) => 50}
side={ "bottom" }
acceptPanOnDrawer={ true }
onDragStart={ () => {} }
>
</Drawer>
);
Expand Down