Skip to content

Commit 06038e5

Browse files
authored
Remove outline on hidden TextInput of PinInput component (#812)
1 parent b07029d commit 06038e5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/components/PinInput/PinInput.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
TextInput as NativeTextInput,
77
View,
88
StyleSheet,
9+
Platform,
910
} from "react-native";
1011
import TextInput, { TextInputProps } from "../TextInput";
1112
import {
@@ -133,7 +134,12 @@ const PinInput = React.forwardRef<NativeTextInput, PinInputProps>(
133134
value={value}
134135
onChangeText={onChangeText}
135136
rootStyle={styles.rootContainer}
136-
textInputStyle={{ height: "100%" }} // addresses issue on firefox where the hidden input did not fill the height
137+
textInputStyle={[
138+
// addresses issue on firefox where the hidden input did not fill the height
139+
{ height: "100%" },
140+
//@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
141+
Platform.OS === "web" ? { outlineWidth: 0 } : {},
142+
]}
137143
InputComponent={TextInput}
138144
cellCount={cellCount}
139145
renderCell={({ symbol: cellValue, index, isFocused }) => (

0 commit comments

Comments
 (0)