Skip to content

Commit

Permalink
fix: input-item style #279
Browse files Browse the repository at this point in the history
  • Loading branch information
BANG88 committed Jan 18, 2019
1 parent 3524be9 commit a6e22b8
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions components/input-item/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import React from 'react';
import {
GestureResponderEvent,
Platform,
StyleSheet,
Text,
TextInputProperties,
TouchableOpacity,
TouchableWithoutFeedback,
View,
} from 'react-native';
import { GestureResponderEvent, Platform, StyleSheet, Text, TextInputProperties, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';
import { Omit } from 'utility-types';
import Icon from '../icon';
import { WithTheme, WithThemeStyles } from '../style';
Expand Down Expand Up @@ -208,7 +199,7 @@ export default class InputItem extends React.Component<
}
const disabledStyle = disabled ? s.inputDisabled : {};
return (
<View style={[s.container, containerStyle, style]}>
<View style={[s.container, containerStyle]}>
{children ? (
typeof children === 'string' ? (
<Text style={[s.text, textStyle]}>{children}</Text>
Expand All @@ -231,7 +222,7 @@ export default class InputItem extends React.Component<
error ? s.inputErrorColor : null,
disabledStyle,
// 支持自定义样式
restProps.style,
style,
]}
keyboardType={keyboardType}
onChange={event => this.onChange(event.nativeEvent.text)}
Expand Down

0 comments on commit a6e22b8

Please sign in to comment.