-
-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: move current exmple to bare folder * chore: move shared code from bare to app * chore: added expo example * chore: added gesture handler root view
- Loading branch information
Showing
190 changed files
with
705 additions
and
5,222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ android.iml | |
|
||
# Cocoapods | ||
# | ||
example/ios/Pods | ||
Pods/ | ||
|
||
# node.js | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "@gorhom/bottom-sheet-example-app", | ||
"description": "Example app for @gorhom/bottom-sheet", | ||
"version": "0.0.1", | ||
"main": "./src/index", | ||
"react-native": "./src/index", | ||
"private": true, | ||
"peerDependencies": { | ||
"@gorhom/portal": "^1.0.13", | ||
"@gorhom/showcase-template": "^2.1.0", | ||
"@react-native-community/blur": "^3.6.0", | ||
"@react-native-community/masked-view": "0.1.11", | ||
"@react-navigation/bottom-tabs": "^6.0.9", | ||
"@react-navigation/elements": "^1.2.1", | ||
"@react-navigation/material-top-tabs": "^6.0.6", | ||
"@react-navigation/native": "^6.0.6", | ||
"@react-navigation/native-stack": "^6.2.5", | ||
"@react-navigation/stack": "^6.0.11", | ||
"faker": "^4.1.0", | ||
"nanoid": "^3.3.3", | ||
"react": "17.0.2", | ||
"react-native": "0.68.1", | ||
"react-native-gesture-handler": "^2.1.0", | ||
"react-native-maps": "^0.30.1", | ||
"react-native-pager-view": "^5.4.9", | ||
"react-native-reanimated": "^2.8.0", | ||
"react-native-redash": "^16.0.11", | ||
"react-native-safe-area-context": "4.2.4", | ||
"react-native-screens": "^3.10.1", | ||
"react-native-tab-view": "^3.1.1", | ||
"@babel/core": "^7.13.10", | ||
"@babel/runtime": "^7.13.10", | ||
"@types/faker": "^4.1.12", | ||
"@types/react": "^17.0.35", | ||
"@types/react-native": "^0.66.5", | ||
"metro-react-native-babel-preset": "^0.67.0", | ||
"typescript": "^4.2.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { useMemo } from 'react'; | ||
import { StyleSheet } from 'react-native'; | ||
import { ShowcaseApp } from '@gorhom/showcase-template'; | ||
import { screens as defaultScreens } from './screens'; | ||
import { version, description } from '../../../package.json'; | ||
import { GestureHandlerRootView } from 'react-native-gesture-handler'; | ||
|
||
const author = { | ||
username: 'Mo Gorhom', | ||
url: 'https://gorhom.dev', | ||
}; | ||
|
||
interface AppProps { | ||
screens?: any[]; | ||
} | ||
|
||
export const App = ({ screens: providedScreens }: AppProps) => { | ||
const screens = useMemo( | ||
() => [...defaultScreens, ...(providedScreens ? providedScreens : [])], | ||
[providedScreens] | ||
); | ||
return ( | ||
<GestureHandlerRootView style={styles.container}> | ||
<ShowcaseApp | ||
name="Bottom Sheet" | ||
description={description} | ||
version={version} | ||
author={author} | ||
data={screens} | ||
/> | ||
</GestureHandlerRootView> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
flexGrow: 1, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { memo } from 'react'; | ||
import { ViewStyle, TextStyle } from 'react-native'; | ||
import { ShowcaseButton, ShowcaseLabel } from '@gorhom/showcase-template'; | ||
|
||
interface ButtonProps { | ||
label: string; | ||
labelStyle?: TextStyle; | ||
style?: ViewStyle; | ||
onPress: () => void; | ||
} | ||
|
||
const ButtonComponent = ({ | ||
label, | ||
labelStyle, | ||
style, | ||
onPress, | ||
}: ButtonProps) => ( | ||
<ShowcaseButton containerStyle={style} onPress={onPress}> | ||
<ShowcaseLabel style={labelStyle}>{label}</ShowcaseLabel> | ||
</ShowcaseButton> | ||
); | ||
|
||
export const Button = memo(ButtonComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Button } from './Button'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { ContactItem } from './ContactItem'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { ContactList } from './ContactList'; | ||
export type { ContactListProps } from './ContactList'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
export const styles = StyleSheet.create({ | ||
sectionHeaderContainer: { | ||
paddingTop: 24, | ||
paddingBottom: 6, | ||
backgroundColor: 'white', | ||
}, | ||
sectionHeaderTitle: { | ||
fontSize: 16, | ||
textTransform: 'uppercase', | ||
}, | ||
container: { | ||
overflow: 'visible', | ||
flex: 1, | ||
}, | ||
contentContainer: { | ||
paddingHorizontal: 16, | ||
overflow: 'visible', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
export const styles = StyleSheet.create({ | ||
sectionHeaderContainer: { | ||
paddingTop: 24, | ||
paddingBottom: 6, | ||
backgroundColor: 'white', | ||
}, | ||
sectionHeaderTitle: { | ||
fontSize: 16, | ||
textTransform: 'uppercase', | ||
}, | ||
container: { | ||
flex: 1, | ||
paddingHorizontal: 16, | ||
}, | ||
contentContainer: { | ||
paddingHorizontal: 16, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { CustomBackground } from './CustomBackground'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { CustomFooter } from './CustomFooter'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { CustomHandle } from './CustomHandle'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { HeaderHandle } from './HeaderHandle'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { SearchHandle, SEARCH_HANDLE_HEIGHT } from './SearchHandle'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export { App } from './App'; | ||
export { default as ModalBackdropExample } from './screens/modal/BackdropExample'; | ||
export { withModalProvider } from './screens/modal/withModalProvider'; | ||
export { Button } from './components/button'; | ||
export { ContactList } from './components/contactList'; | ||
export { ContactItem } from './components/contactItem'; | ||
export { SearchHandle, SEARCH_HANDLE_HEIGHT } from './components/searchHandle'; | ||
export * from './utilities/createMockData'; |
6 changes: 3 additions & 3 deletions
6
.../src/screens/advanced/BackdropExample.tsx → .../src/screens/advanced/BackdropExample.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...eens/advanced/CustomBackgroundExample.tsx → ...eens/advanced/CustomBackgroundExample.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../screens/advanced/CustomHandleExample.tsx → .../screens/advanced/CustomHandleExample.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.