Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-raw-bottom-sheet

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-raw-bottom-sheet - npm Package Compare versions

Comparing version 3.0.0-rc.1 to 3.0.0

81

index.d.ts

@@ -1,2 +0,1 @@

import React from 'react';
import {

@@ -10,19 +9,92 @@ StyleProp,

interface RBSheetProps {
/**
* The height of bottom sheet.
*/
height?: number;
/**
* Duration of the animation when opening bottom sheet.
*/
openDuration?: number;
/**
* Duration of the animation when closing bottom sheet.
*/
closeDuration?: number;
/**
* Press the outside area (mask) to close bottom sheet.
*/
closeOnPressMask?: boolean;
/**
* Press hardware back android to close bottom sheet (Android only).
*/
closeOnPressBack?: boolean;
/**
* Enable the drag-down gesture to close the bottom sheet.
*/
draggable?: boolean;
/**
* The draggable is only worked on the draggable icon.
* Set this to true if you want to drag on the content as well (doesn't work with ScrollView).
*/
dragOnContent?: boolean;
/**
* Use the native driver to run smoother animation.
*/
useNativeDriver?: boolean;
/**
* Add custom styles to bottom sheet.
*
* wrapper: The Root of component (Change the mask's background color here).
*
* container: The Container of bottom sheet (The animated view that contains your component).
*
* draggableIcon: The style of Draggable Icon (If you set `draggable` to `true`).
*/
customStyles?: {
/**
* The Root of component (Change the mask's background color here).
*/
wrapper?: StyleProp<ViewStyle>;
/**
* The Container of bottom sheet (The animated view that contains your component).
*/
container?: StyleProp<ViewStyle>;
/**
* The style of Draggable Icon (If you set `draggable` to `true`).
*/
draggableIcon?: StyleProp<ViewStyle>;
};
/**
* Add custom props to modal.
*/
customModalProps?: ModalProps;
/**
* Add custom props to KeyboardAvoidingView.
*/
customAvoidingViewProps?: KeyboardAvoidingViewProps;
/**
* Callback function that will be called after the bottom sheet has been opened.
*/
onOpen?: () => void;
/**
* Callback function that will be called after the bottom sheet has been closed.
*/
onClose?: () => void;
/**
* Your own compoent.
*/
children?: React.ReactNode;

@@ -32,3 +104,10 @@ }

interface RBSheetRef {
/**
* The method to open bottom sheet.
*/
open: () => void;
/**
* The method to close bottom sheet.
*/
close: () => void;

@@ -35,0 +114,0 @@ }

2

package.json
{
"name": "react-native-raw-bottom-sheet",
"version": "3.0.0-rc.1",
"version": "3.0.0",
"description": "Add Your Own Component To Bottom Sheet Whatever You Want (Android & iOS)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,2 +15,3 @@ # react-native-raw-bottom-sheet

](//npmjs.com/package/react-native-raw-bottom-sheet)
[![GitHub Actions](https://github.com/nysamnang/react-native-raw-bottom-sheet/actions/workflows/ci.yml/badge.svg)](https://github.com/nysamnang/react-native-raw-bottom-sheet/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/nysamnang/react-native-raw-bottom-sheet/graph/badge.svg?token=tJuJsd1V8e)](https://codecov.io/gh/nysamnang/react-native-raw-bottom-sheet)

@@ -116,17 +117,17 @@

| Props | Type | Description | Default |
| ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| height | number | The height of bottom sheet | 260 |
| openDuration | number | Duration of the animation when opening bottom sheet | 300 (ms) |
| closeDuration | number | Duration of the animation when closing bottom sheet | 200 (ms) |
| closeOnPressMask | boolean | Press the outside area (mask) to close bottom sheet | true |
| closeOnPressBack | boolean | Press hardware back android to close bottom sheet (Android only) | false |
| draggable | boolean | Enable the drag-down gesture to close the bottom sheet | false |
| dragOnContent | boolean | The draggable is only worked on the draggable icon. Set this to `true`<br />if you want to drag on the content as well (doesn't work with ScrollView) | false |
| useNativeDriver | boolean | Use the native driver to run smoother animation | false |
| customStyles | object | Add [custom styles](#available-custom-style) to bottom sheet | {} |
| customModalProps | object | Add [custom props](https://reactnative.dev/docs/modal#props) to modal | {} |
| customAvoidingViewProps | object | Add [custom props](https://reactnative.dev/docs/keyboardavoidingview#props) to KeyboardAvoidingView | {} |
| onOpen | function | Callback function that will be called after the bottom sheet has been opened | null |
| onClose | function | Callback function that will be called after the bottom sheet has been closed | null |
| Props | Type | Description | Default |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| height | number | The height of bottom sheet. | 260 |
| openDuration | number | Duration of the animation when opening bottom sheet. | 300 (ms) |
| closeDuration | number | Duration of the animation when closing bottom sheet. | 200 (ms) |
| closeOnPressMask | boolean | Press the outside area (mask) to close bottom sheet. | true |
| closeOnPressBack | boolean | Press hardware back android to close bottom sheet (Android only). | false |
| draggable | boolean | Enable the drag-down gesture to close the bottom sheet. | false |
| dragOnContent | boolean | The draggable is only worked on the draggable icon. Set this to `true`<br />if you want to drag on the content as well (doesn't work with ScrollView). | false |
| useNativeDriver | boolean | Use the native driver to run smoother animation. | false |
| customStyles | object | Add [custom styles](#available-custom-style) to bottom sheet. | {} |
| customModalProps | object | Add [custom props](https://reactnative.dev/docs/modal#props) to modal. | {} |
| customAvoidingViewProps | object | Add [custom props](https://reactnative.dev/docs/keyboardavoidingview#props) to KeyboardAvoidingView. | {} |
| onOpen | function | Callback function that will be called after the bottom sheet has been opened. | null |
| onClose | function | Callback function that will be called after the bottom sheet has been closed. | null |

@@ -145,6 +146,6 @@ ### Available Custom Style

| Method Name | Description | Usage |
| ----------- | ---------------------- | ---------------------------- |
| open | Open the bottom sheet | `refRBSheet.current.open()` |
| close | Close the bottom sheet | `refRBSheet.current.close()` |
| Method Name | Description | Usage |
| ----------- | --------------------------------- | ---------------------------- |
| open | The method to open bottom sheet. | `refRBSheet.current.open()` |
| close | The method to close bottom sheet. | `refRBSheet.current.close()` |

@@ -151,0 +152,0 @@ ## CONTRIBUTING

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc