Skip to content

Commit

Permalink
Add bottom sheet example (#556)
Browse files Browse the repository at this point in the history
Reanimated Bottom Sheet is probably one of the most complex things built with reanimated and probably can be used while verifying bugs not observable in more primitive examples.
  • Loading branch information
osdnk authored Jan 16, 2020
1 parent 98d422e commit 0447e5e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { RectButton, ScrollView } from 'react-native-gesture-handler';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import BottomSheetPlayground from 'reanimated-bottom-sheet/Example/App'

import ChatHeads from './chatHeads';
import Code from './code';
Expand Down Expand Up @@ -46,6 +47,7 @@ const SCREENS = {
Test: { screen: Test, title: 'Test' },
ImageViewer: { screen: ImageViewer, title: 'Image Viewer' },
Interactable: { screen: InteractablePlayground, title: 'Interactable' },
BottomSheet: { screen: BottomSheetPlayground, title: 'BottomSheet Playground' },
Interpolate: { screen: Interpolate, title: 'Interpolate' },
Colors: { screen: Colors, title: 'Colors' },
StartAPI: { screen: StartAPI, title: 'Start API' },
Expand Down Expand Up @@ -91,6 +93,7 @@ class MainScreen extends React.Component {
static navigationOptions = {
title: '🎬 Reanimated Examples',
};

render() {
const data = Object.keys(SCREENS).map(key => ({ key }));
return (
Expand Down
1 change: 1 addition & 0 deletions Example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = api => {
{
alias: {
'react-native-reanimated': '../src/Animated',
'reanimated-bottom-sheet': './node_modules/reanimated-bottom-sheet',
react: './node_modules/react',
'react-native': './node_modules/react-native',
'@babel': './node_modules/@babel',
Expand Down
3 changes: 2 additions & 1 deletion Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"react-native-gesture-handler": "^1.5.0",
"react-native-web": "^0.11.7",
"react-navigation": "4.0.3",
"react-navigation-stack": "^1.7.3"
"react-navigation-stack": "^1.7.3",
"reanimated-bottom-sheet": "osdnk/react-native-reanimated-bottom-sheet#reanimated-example"
},
"devDependencies": {
"@babel/core": "^7.6.2",
Expand Down
4 changes: 4 additions & 0 deletions Example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5977,6 +5977,10 @@ realpath-native@^1.1.0:
dependencies:
util.promisify "^1.0.0"

reanimated-bottom-sheet@osdnk/react-native-reanimated-bottom-sheet#reanimated-example:
version "1.0.0-alpha.18"
resolved "https://codeload.github.com/osdnk/react-native-reanimated-bottom-sheet/tar.gz/3e2c887eabdbd0d5daa4372d4059bcbebfeb4732"

regenerate-unicode-properties@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c"
Expand Down

0 comments on commit 0447e5e

Please sign in to comment.