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';
66
77import { ThemeContext , createStyleSheet , HALF_COLOR } from '../styles' ;
88
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-
239type Props = $ReadOnly < { |
2410 onChangeText : ( value : string ) => void ,
2511 value : string ,
@@ -51,13 +37,32 @@ export default function SmartUrlInput(props: Props): Node {
5137 } , [ ] ) ,
5238 ) ;
5339
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+
5459 return (
5560 < View style = { styles . wrapper } >
5661 < TextInput
5762 value = { value }
5863 placeholder = "your-org.zulipchat.com"
5964 placeholderTextColor = { HALF_COLOR }
60- style = { [ styles . realmInput , { color : themeContext . color } ] }
65+ style = { styles . realmInput }
6166 autoFocus
6267 autoCorrect = { false }
6368 autoCapitalize = "none"
You can’t perform that action at this time.
0 commit comments