-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
1,644 additions
and
1,600 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,70 @@ | ||
import React, { useState } from "react"; | ||
import { | ||
Button, | ||
SafeAreaView, | ||
ScrollView, | ||
Text, | ||
StatusBar, | ||
StyleSheet, | ||
useColorScheme, | ||
View, | ||
} from "react-native"; | ||
import { Colors } from "react-native/Libraries/NewAppScreen"; | ||
import { multiply } from "@react-native-async-storage/sqlite-storage"; | ||
|
||
function App(): React.JSX.Element { | ||
const isDarkMode = useColorScheme() === "dark"; | ||
const [result, setResult] = useState<string | null>(null); | ||
|
||
const backgroundStyle = { | ||
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, | ||
}; | ||
|
||
async function test() { | ||
const random = Math.round(Math.random() * 100); | ||
const result = await multiply(random, 2); | ||
setResult(`${random} * 2 = ${result}`); | ||
} | ||
|
||
return ( | ||
<SafeAreaView style={[backgroundStyle, styles.container]}> | ||
<StatusBar | ||
barStyle={isDarkMode ? "light-content" : "dark-content"} | ||
backgroundColor={backgroundStyle.backgroundColor} | ||
/> | ||
<ScrollView | ||
contentInsetAdjustmentBehavior="automatic" | ||
style={backgroundStyle} | ||
> | ||
<Button title="test module" onPress={() => test()} /> | ||
<View style={styles.result}> | ||
{result ? <Text style={styles.title}>{result}</Text> : null} | ||
</View> | ||
</ScrollView> | ||
</SafeAreaView> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
marginTop: 32, | ||
paddingHorizontal: 24, | ||
}, | ||
title: { | ||
fontSize: 24, | ||
fontWeight: "600", | ||
textAlign: "center", | ||
}, | ||
sectionDescription: { | ||
marginTop: 8, | ||
fontSize: 24, | ||
fontWeight: "400", | ||
}, | ||
result: { | ||
fontSize: 24, | ||
marginTop: 24, | ||
fontWeight: "700", | ||
}, | ||
}); | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
119 changes: 0 additions & 119 deletions
119
packages/sqlite-storage/example/android/app/build.gradle
This file was deleted.
Oops, something went wrong.
Binary file not shown.
10 changes: 0 additions & 10 deletions
10
packages/sqlite-storage/example/android/app/proguard-rules.pro
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/sqlite-storage/example/android/app/src/debug/AndroidManifest.xml
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
packages/sqlite-storage/example/android/app/src/main/AndroidManifest.xml
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...sqlite-storage/example/android/app/src/main/java/com/sqlitestorageexample/MainActivity.kt
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
...ite-storage/example/android/app/src/main/java/com/sqlitestorageexample/MainApplication.kt
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
packages/sqlite-storage/example/android/app/src/main/res/drawable/rn_edit_text_material.xml
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-2.98 KB
...ges/sqlite-storage/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed
BIN
-4.91 KB
...lite-storage/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed
BIN
-2.05 KB
...ges/sqlite-storage/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed
BIN
-2.79 KB
...lite-storage/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed
BIN
-4.46 KB
...es/sqlite-storage/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed
BIN
-6.93 KB
...ite-storage/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed
BIN
-6.31 KB
...s/sqlite-storage/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed
BIN
-10.4 KB
...te-storage/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed
BIN
-9.03 KB
.../sqlite-storage/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed
BIN
-15.2 KB
...e-storage/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Binary file not shown.
3 changes: 0 additions & 3 deletions
3
packages/sqlite-storage/example/android/app/src/main/res/values/strings.xml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/sqlite-storage/example/android/app/src/main/res/values/styles.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.