Skip to content

Commit

Permalink
fix(components): input - size on android
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored Feb 6, 2020
1 parent d69cc02 commit c27c610
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/components/ui/input/input.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export class InputComponent extends React.Component<InputProps> implements WebEv
placeholderTextColor={componentStyle.placeholder.color}
{...restProps}
{...this.webEventResponder.eventHandlers}
style={[componentStyle.text, styles.text, webStyles.text, textStyle]}
style={[componentStyle.text, styles.text, platformStyles.text, textStyle]}
editable={!restProps.disabled}
onFocus={this.onTextFieldFocus}
onBlur={this.onTextFieldBlur}
Expand Down Expand Up @@ -380,11 +380,16 @@ const styles = StyleSheet.create({
},
});

const webStyles = Platform.OS === 'web' && StyleSheet.create({
text: {
// @ts-ignore
outlineWidth: 0,
},
const platformStyles = StyleSheet.create({
text: Platform.select({
default: null,
android: {
paddingVertical: 0,
},
web: {
outlineWidth: 0,
},
}),
});

export const Input = styled<InputProps>(InputComponent);

0 comments on commit c27c610

Please sign in to comment.