-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
25 lines (18 loc) · 697 Bytes
/
Copy pathApp.tsx
File metadata and controls
25 lines (18 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import Timekeeper from './src/Chronometer';
import { SafeAreaView, useColorScheme } from 'react-native';
import { Colors } from 'react-native/Libraries/NewAppScreen';
function App() {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
const [elapsedTime, setElapsedTime] = React.useState(0);
const [running, setRunning] = React.useState(false);
return (
<SafeAreaView style={backgroundStyle}>
<Timekeeper elapsedTime={elapsedTime} running={running} setRunning={setRunning} setTimer={setElapsedTime} />
</SafeAreaView>
);
}
export default App;