├── demo ├── assets │ ├── icon.png │ └── splash.png ├── babel.config.js ├── package.json ├── app.json ├── README.md └── App.js ├── LICENSE ├── README.md ├── DockingBottomSheet.js └── ReactNativeExample.js /demo/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamrajatsoni/DockingBottomSheet/HEAD/demo/assets/icon.png -------------------------------------------------------------------------------- /demo/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamrajatsoni/DockingBottomSheet/HEAD/demo/assets/splash.png -------------------------------------------------------------------------------- /demo/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "node_modules/expo/AppEntry.js", 3 | "scripts": { 4 | "start": "expo start", 5 | "android": "expo start --android", 6 | "ios": "expo start --ios", 7 | "web": "expo start --web", 8 | "eject": "expo eject" 9 | }, 10 | "dependencies": { 11 | "docking-bottom-sheet": "^1.0.3", 12 | "expo": "^34.0.1", 13 | "react": "16.8.3", 14 | "react-dom": "^16.8.6", 15 | "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz", 16 | "react-native-web": "^0.11.4" 17 | }, 18 | "devDependencies": { 19 | "babel-preset-expo": "^6.0.0" 20 | }, 21 | "private": true 22 | } 23 | -------------------------------------------------------------------------------- /demo/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "DockingBottomSheet", 4 | "slug": "DockingBottomSheet", 5 | "privacy": "public", 6 | "sdkVersion": "34.0.0", 7 | "platforms": [ 8 | "ios", 9 | "android", 10 | "web" 11 | ], 12 | "version": "1.0.0", 13 | "orientation": "portrait", 14 | "icon": "./assets/icon.png", 15 | "splash": { 16 | "image": "./assets/splash.png", 17 | "resizeMode": "contain", 18 | "backgroundColor": "#ffffff" 19 | }, 20 | "updates": { 21 | "fallbackToCacheTimeout": 0 22 | }, 23 | "assetBundlePatterns": [ 24 | "**/*" 25 | ], 26 | "ios": { 27 | "supportsTablet": true 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # Docking-Bottom-Sheet demo 2 | **A React Native demo in Expo for [Docking Bottom Sheet](https://www.npmjs.com/package/docking-bottom-sheet)** 3 | - `npm install` inside this directory after cloning. 4 | - Make sure you have `expo cli` installed, if not refer [this doc](https://facebook.github.io/react-native/docs/getting-started) 5 | - Run `expo start` command from this directory. 6 | 7 | To understand how [it](https://www.npmjs.com/package/docking-bottom-sheet) works, refer links below: 8 | - [npm](https://www.npmjs.com/package/docking-bottom-sheet) 9 | - [GitHub](https://github.com/iamrajatsoni/DockingBottomSheet) 10 |
11 | DockingBottomSheet 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Rajat Soni 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # docking-bottom-sheet [![NPM version](https://badge.fury.io/js/docking-bottom-sheet.svg)](https://npmjs.org/package/docking-bottom-sheet) [![Build Status](https://travis-ci.org/Rajat%20Soni/docking-bottom-sheet.svg?branch=master)](https://travis-ci.org/Rajat%20Soni/docking-bottom-sheet) 4 | npm link: [https://www.npmjs.com/package/docking-bottom-sheet](https://www.npmjs.com/package/docking-bottom-sheet)
5 | Demo link: [https://github.com/iamrajatsoni/DockingBottomSheet/tree/master/demo](https://github.com/iamrajatsoni/DockingBottomSheet/tree/master/demo) 6 | 7 | DockingBottomSheet 8 | 9 | > DockingBottomSheet offers a React Native component that takes in 2 types of content views as props. 10 | > One is Main content view and the other is Bottom-Sheet content view. Initially Main view is the active view when Bottom-Sheet is docked at the bottom. It can also be expanded and docked at the top by dragging or using function `expandBottomSheet()`. Once expanded, `dockBottomSheet()` function can be used to programmatically dock the rendered bottom-sheet. Various other props are exposed that can be used to customise `DockingBottomSheet` depending on one's requirement. 11 | > 12 | 13 | ## Installation 14 | ```sh 15 | $ npm i docking-bottom-sheet 16 | ``` 17 | 18 | ## Import and Basic Usage 19 | __Import__ 20 | ```js 21 | import DockingBottomSheet from 'docking-bottom-sheet' 22 | ``` 23 | ```js 24 | var DockingBottomSheet = require('docking-bottom-sheet'); 25 | ``` 26 | 27 | __Basic Usage__ 28 | ```jsx 29 | this.bottomSheetRef = bottomSheetRef } 31 | containerStyle={