expo-stacked-sheets 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -10
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Expo Stacked Sheets
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
screen, then reopen any draft from an iOS Mail-style card overview.
|
|
3
|
+
3D stacked sheets for Expo and React Native. Works on iOS and Android.
|
|
5
4
|
|
|
6
5
|
## Demo
|
|
7
6
|
|
|
@@ -20,11 +19,13 @@ Requires Expo SDK 58 and React Native 0.88.
|
|
|
20
19
|
npx expo install expo-stacked-sheets
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
`'react-native-safe-area-context@~5.10.1'
|
|
22
|
+
On Expo 58.0.22, use
|
|
23
|
+
`npx expo install expo-stacked-sheets 'react-native-safe-area-context@~5.10.1'`.
|
|
25
24
|
|
|
26
25
|
## Usage
|
|
27
26
|
|
|
27
|
+
Add this to `App.tsx` or a full-screen Expo Router route.
|
|
28
|
+
|
|
28
29
|
```tsx
|
|
29
30
|
import { StackedSheets } from 'expo-stacked-sheets';
|
|
30
31
|
import { Button } from 'react-native';
|
|
@@ -36,9 +37,13 @@ export default function App() {
|
|
|
36
37
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
37
38
|
<SafeAreaProvider>
|
|
38
39
|
<StackedSheets
|
|
40
|
+
initialSheets={[
|
|
41
|
+
{ title: 'Weekend plans', body: 'Pick a place for breakfast.' },
|
|
42
|
+
{ title: 'Reading list', body: 'Finish the last chapter.' },
|
|
43
|
+
]}
|
|
39
44
|
renderBackground={({ active, openSheet }) => (
|
|
40
45
|
<SafeAreaView>
|
|
41
|
-
<Button title="New
|
|
46
|
+
<Button title="New sheet" disabled={!active} onPress={() => openSheet()} />
|
|
42
47
|
</SafeAreaView>
|
|
43
48
|
)}
|
|
44
49
|
/>
|
|
@@ -48,8 +53,10 @@ export default function App() {
|
|
|
48
53
|
}
|
|
49
54
|
```
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
Tap the bar at the bottom to see both sheets. The down arrow minimizes a sheet.
|
|
57
|
+
|
|
58
|
+
Sheets stay in memory. To enable Save, pass a synchronous `onSaveSheet` callback
|
|
59
|
+
that returns `true` when the save succeeds.
|
|
53
60
|
[Component props](https://github.com/siyo-ch/expo-stacked-sheets/blob/main/packages/stacked-sheets/src/types.ts)
|
|
54
61
|
|
|
55
62
|
## Run the Notes demo
|
|
@@ -58,7 +65,4 @@ From a [repository checkout](https://github.com/siyo-ch/expo-stacked-sheets), ru
|
|
|
58
65
|
`npm ci && npm start`. Press `i` for iOS or `a` for Android.
|
|
59
66
|
[Photo credits](https://github.com/siyo-ch/expo-stacked-sheets/blob/main/assets/notes/CREDITS.md)
|
|
60
67
|
|
|
61
|
-
For an unpublished build, run `npm pack --workspace expo-stacked-sheets` and
|
|
62
|
-
install the resulting `.tgz` in your Expo app.
|
|
63
|
-
|
|
64
68
|
[MIT](https://github.com/siyo-ch/expo-stacked-sheets/blob/main/LICENSE)
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-stacked-sheets",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"keywords": ["expo", "react-native", "stacked-sheets", "
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "3D stacked sheets for Expo and React Native, built with Reanimated and Gesture Handler.",
|
|
5
|
+
"keywords": ["expo", "react-native", "stacked-sheets", "bottom-sheet", "sheet", "3d", "reanimated", "gesture-handler", "ios", "android"],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/siyo-ch/expo-stacked-sheets",
|
|
8
8
|
"bugs": "https://github.com/siyo-ch/expo-stacked-sheets/issues",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": ["src"],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"prepack": "node -
|
|
26
|
+
"prepack": "node scripts/prepare-readme.cjs"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@react-navigation/native": "^7.5.1",
|