1
1
import React , { useState } from 'react'
2
2
import { useDispatch , useSelector } from 'react-redux'
3
- import { View , ActivityIndicator , Text , TextInput , Button } from 'react-native'
3
+ import {
4
+ View ,
5
+ ActivityIndicator ,
6
+ Text ,
7
+ TextInput ,
8
+ TouchableOpacity ,
9
+ } from 'react-native'
4
10
import { Brand } from '@/Components'
5
11
import { useTheme } from '@/Theme'
6
12
import FetchOne from '@/Store/User/FetchOne'
@@ -37,7 +43,9 @@ const IndexExampleContainer = () => {
37
43
{ fetchOneUserError ? (
38
44
< Text style = { Fonts . textRegular } > { fetchOneUserError . message } </ Text >
39
45
) : (
40
- < Text style = { Fonts . textRegular } > { t ( 'example.helloUser' , { name : user . name } ) } </ Text >
46
+ < Text style = { Fonts . textRegular } >
47
+ { t ( 'example.helloUser' , { name : user . name } ) }
48
+ </ Text >
41
49
) }
42
50
</ View >
43
51
< View
@@ -49,7 +57,7 @@ const IndexExampleContainer = () => {
49
57
Common . backgroundPrimary ,
50
58
] }
51
59
>
52
- < Text style = { [ Layout . fill , Fonts . textCenter ] } >
60
+ < Text style = { [ Layout . fill , Fonts . textCenter , Fonts . textSmall ] } >
53
61
{ t ( 'example.labels.userId' ) }
54
62
</ Text >
55
63
< TextInput
@@ -62,10 +70,26 @@ const IndexExampleContainer = () => {
62
70
style = { [ Layout . fill , Common . textInput ] }
63
71
/>
64
72
</ View >
65
- < Text style = { Fonts . textRegular } > DarkMode :</ Text >
66
- < Button onPress = { ( ) => changeTheme ( { darkMode : null } ) } title = "Auto" />
67
- < Button onPress = { ( ) => changeTheme ( { darkMode : true } ) } title = "Dark" />
68
- < Button onPress = { ( ) => changeTheme ( { darkMode : false } ) } title = "Light" />
73
+ < Text style = { [ Fonts . textRegular , Gutters . smallBMargin ] } > DarkMode :</ Text >
74
+
75
+ < TouchableOpacity
76
+ style = { [ Common . button . rounded , Gutters . regularBMargin ] }
77
+ onPress = { ( ) => changeTheme ( { darkMode : null } ) }
78
+ >
79
+ < Text style = { Fonts . textRegular } > Auto</ Text >
80
+ </ TouchableOpacity >
81
+ < TouchableOpacity
82
+ style = { [ Common . button . outlineRounded , Gutters . regularBMargin ] }
83
+ onPress = { ( ) => changeTheme ( { darkMode : true } ) }
84
+ >
85
+ < Text style = { Fonts . textRegular } > Dark</ Text >
86
+ </ TouchableOpacity >
87
+ < TouchableOpacity
88
+ style = { [ Common . button . outline , Gutters . regularBMargin ] }
89
+ onPress = { ( ) => changeTheme ( { darkMode : false } ) }
90
+ >
91
+ < Text style = { Fonts . textRegular } > Light</ Text >
92
+ </ TouchableOpacity >
69
93
</ View >
70
94
)
71
95
}
0 commit comments