-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
38 lines (35 loc) · 1.09 KB
/
index.tsx
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
26
27
28
29
30
31
32
33
34
35
36
37
38
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { Button } from '@components/Button/Button';
import { ModalHandlerPassword } from '@components/ModalHandlerPassword/ModaHandlerPassword';
import { SizeSlider } from '@components/SizeSlider/SizeSlider';
import { useContext } from 'react';
import GeneratePasswordContext from 'providers/useGeneratePassword';
import { ListKeys } from '@components/ListKeys/ListKeys';
export default function AppMain() {
const { generateString } = useContext(GeneratePasswordContext)
return (
<View style={styles.container}>
<StatusBar style="auto" />
<ModalHandlerPassword />
<Text style={styles.title}>Gerador de Senha</Text>
<SizeSlider />
<Button label='Gerar Senha' onPress={generateString} />
<ListKeys />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#111',
alignItems: 'center',
justifyContent: 'center',
},
title: {
color: '#ddd',
fontSize: 20,
fontWeight: 'bold',
marginBottom: 10
}
});