-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
22 lines (18 loc) · 756 Bytes
/
App.js
File metadata and controls
22 lines (18 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Platform, StyleSheet, Switch, Text, View } from 'react-native';
import ProductList from './ProductList';
import React from 'react';
import { StatusBar } from 'expo-status-bar';
import { useColorScheme } from 'nativewind';
export default function App() {
const { colorScheme, toggleColorScheme } = useColorScheme();
return (
<View className="flex-1 items-center justify-center pt-10 bg-gray-200 dark:bg-black">
<View className="flex-row w-full gap-5">
<Switch value={colorScheme === "dark"} onChange={toggleColorScheme} />
<Text className="dark:text-white text-2xl">New Collection</Text>
</View>
<ProductList />
<StatusBar style={colorScheme === "dark" ? "light" : "dark"} />
</View>
);
}