Skip to content

Commit e6bf833

Browse files
author
Marco Cesarato
committed
fix(style): textinput outline on focus for react-native-web
1 parent bd6309a commit e6bf833

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

style.js

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,27 @@
33
* @author Marco Cesarato <[email protected]>
44
*/
55

6-
import {StyleSheet} from 'react-native';
6+
import {StyleSheet, Platform} from 'react-native';
7+
8+
const inputStyle = {
9+
flex: 1,
10+
minHeight: 50,
11+
borderColor: '#FFF',
12+
borderBottomColor: '#CCC',
13+
backgroundColor: 'transparent',
14+
justifyContent: 'center',
15+
borderWidth: 1,
16+
color: 'black',
17+
fontSize: 20,
18+
borderRadius: 4,
19+
marginTop: 20,
20+
outlineWidth: 0,
21+
outlineStyle: 'none'
22+
}
23+
24+
const inputWebStyle = {
25+
...inputStyle,
26+
}
727

828
export const Style = StyleSheet.create({
929
element: {
@@ -14,19 +34,7 @@ export const Style = StyleSheet.create({
1434
alignItems: 'center',
1535
justifyContent: 'flex-start',
1636
},
17-
input: {
18-
flex: 1,
19-
minHeight: 50,
20-
borderColor: '#FFF',
21-
borderBottomColor: '#CCC',
22-
backgroundColor: 'transparent',
23-
justifyContent: 'center',
24-
borderWidth: 1,
25-
color: 'black',
26-
fontSize: 20,
27-
borderRadius: 4,
28-
marginTop: 20
29-
},
37+
input: Platform.OS === 'web' ? inputWebStyle : inputStyle,
3038
label: {
3139
marginTop: 21,
3240
color: '#AAA',

0 commit comments

Comments
 (0)