Skip to content

Commit 672d030

Browse files
authored
Merge pull request #340 from vallemar/doc-bottom-sheet
(Bottom Sheet) doc add BottomSheetOptions
2 parents 7f16b68 + 6189ac5 commit 672d030

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

packages/bottomsheet/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,45 @@ Be sure to run a new build after adding plugins to avoid any issues.
3838

3939
## [FAQ](../../README.md#faq)
4040

41+
## API
42+
43+
```ts
44+
export interface BottomSheetOptions {
45+
view: string | ViewBase;
46+
// View instance to be shown in bottom sheet. Or the name of the module to load starting from the application root.
47+
context?: any;
48+
// Any context you want to pass to the view shown in bottom sheet. This same context will be available in the arguments of the shownInBottomSheet event handler.
49+
animated?: boolean;
50+
// An optional parameter specifying whether to show the sheet view with animation.
51+
dismissOnBackgroundTap?: boolean;
52+
// An optional parameter specifying whether to dismiss the sheet when clicking on background.
53+
dismissOnDraggingDownSheet?: boolean;
54+
// An optional parameter specifying whether to disable dragging the sheet to dismiss.
55+
dismissOnBackButton?: boolean;
56+
// An optional parameter that specifies whether to close the sheet when pressing the back button.
57+
closeCallback?: Function;
58+
// A function that will be called when the view is closed. Any arguments provided when calling shownInBottomSheet.closeCallback will be available here.
59+
trackingScrollView?: string;
60+
// optional id of the scroll view to track
61+
transparent?: boolean;
62+
// optional parameter to make the bottomsheet transparent
63+
ignoreTopSafeArea?: boolean;
64+
// optional ios parameter to top safe area. Default is true
65+
ignoreBottomSafeArea?: boolean;
66+
// optional ios parameter to bottom safe area. Default is false
67+
disableDimBackground?: boolean;
68+
// optional parameter to remove the dim background
69+
skipCollapsedState?: boolean;
70+
// optional Android parameter to skip midway state when view is greater than 50%. Default is false
71+
peekHeight?: number;
72+
// optional parameter to set the collapsed sheet height. To work on iOS you need to set trackingScrollView.
73+
ignoreKeyboardHeight?: boolean;
74+
//(iOS only) A Boolean value that controls whether the height of the keyboard should affect the bottom sheet's frame when the keyboard shows on the screen. (Default: true)
75+
onChangeState?: onChangeStateBottomSheet;
76+
// One works to be called on the scroll of the sheet. Parameters: state (CLOSED, DRAGGING, DRAGGING, COLLAPSED) and slideOffset is the new offset of this bottom sheet within [-1,1] range. Offset increases as this bottom sheet is moving upward. From 0 to 1 the sheet is between collapsed and expanded states and from -1 to 0 it is between hidden and collapsed states.
77+
}
78+
```
79+
4180
## Usage
4281

4382
### Plain NativeScript

0 commit comments

Comments
 (0)