File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,6 @@ import { useFocusEffect } from '@react-navigation/native';
6
6
7
7
import { ThemeContext , createStyleSheet , HALF_COLOR } from '../styles' ;
8
8
9
- const styles = createStyleSheet ( {
10
- wrapper : {
11
- flexDirection : 'row' ,
12
- opacity : 0.8 ,
13
- marginTop : 16 ,
14
- marginBottom : 8 ,
15
- } ,
16
- realmInput : {
17
- flex : 1 ,
18
- padding : 0 ,
19
- fontSize : 20 ,
20
- } ,
21
- } ) ;
22
-
23
9
type Props = $ReadOnly < { |
24
10
onChangeText : ( value : string ) => void ,
25
11
value : string ,
@@ -51,13 +37,32 @@ export default function SmartUrlInput(props: Props): Node {
51
37
} , [ ] ) ,
52
38
) ;
53
39
40
+ const styles = React . useMemo (
41
+ ( ) =>
42
+ createStyleSheet ( {
43
+ wrapper : {
44
+ flexDirection : 'row' ,
45
+ opacity : 0.8 ,
46
+ marginTop : 16 ,
47
+ marginBottom : 8 ,
48
+ } ,
49
+ realmInput : {
50
+ flex : 1 ,
51
+ padding : 0 ,
52
+ fontSize : 20 ,
53
+ color : themeContext . color ,
54
+ } ,
55
+ } ) ,
56
+ [ themeContext ] ,
57
+ ) ;
58
+
54
59
return (
55
60
< View style = { styles . wrapper } >
56
61
< TextInput
57
62
value = { value }
58
63
placeholder = "your-org.zulipchat.com"
59
64
placeholderTextColor = { HALF_COLOR }
60
- style = { [ styles . realmInput , { color : themeContext . color } ] }
65
+ style = { styles . realmInput }
61
66
autoFocus
62
67
autoCorrect = { false }
63
68
autoCapitalize = "none"
You can’t perform that action at this time.
0 commit comments