Skip to content

Commit

Permalink
add ActionSheetRefObject type
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Aug 31, 2021
1 parent 17ee28d commit 6022a7f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
import ActionSheet from "./src/index";

export type ActionSheetRefObject = {
/**
* Open or close the ActionSheet.
*/
setModalVisible(visible?: boolean): void;

/**
* Open the Action Sheet.
*/
show(): void;

/**
* Close the ActionSheet.
*/
hide(): void;


/**
* Attach this to any child ScrollView Component's onScrollEndDrag,
* onMomentumScrollEnd,onScrollAnimationEnd callbacks to handle the ActionSheet
* closing and bouncing back properly.
*/
handleChildScrollEnd(): void;

/**
* Snap ActionSheet to given offset
*/
snapToOffset(offset: number): void;
}

export default ActionSheet;

0 comments on commit 6022a7f

Please sign in to comment.