Skip to content

Commit 0a8be71

Browse files
committed
feat: style prop
1 parent 3d95119 commit 0a8be71

File tree

4 files changed

+27045
-6094
lines changed

4 files changed

+27045
-6094
lines changed

lib/InteractiveTextInput.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
ImageStyle,
1313
ImageSourcePropType,
1414
} from "react-native";
15+
1516
/**
1617
* ? Local Imports
1718
*/
@@ -25,17 +26,11 @@ const PLACEHOLDER_COLOR = "#757575";
2526
const ORIGINAL_VALUE = 0;
2627
const ANIMATED_VALUE = 1;
2728

28-
type CustomStyleProp = StyleProp<ViewStyle> | Array<StyleProp<ViewStyle>>;
29-
type CustomTextStyleProp = StyleProp<TextStyle> | Array<StyleProp<TextStyle>>;
30-
type CustomImageStyleProp =
31-
| StyleProp<ImageStyle>
32-
| Array<StyleProp<ImageStyle>>;
33-
3429
export interface IInteractiveTextInputProps extends TextInputProps {
35-
style?: CustomStyleProp;
36-
textInputStyle?: CustomTextStyleProp;
37-
iconContainerStyle?: CustomStyleProp;
38-
iconImageStyle?: CustomImageStyleProp;
30+
style?: StyleProp<ViewStyle>;
31+
textInputStyle?: StyleProp<TextStyle>;
32+
iconContainerStyle?: StyleProp<ViewStyle>;
33+
iconImageStyle?: StyleProp<ImageStyle>;
3934
iconImageSource?: ImageSourcePropType;
4035
ImageComponent?: any;
4136
IconComponent?: any;
@@ -143,7 +138,7 @@ export default class InteractiveTextInput extends React.Component<
143138

144139
render() {
145140
return (
146-
<View style={styles.container}>
141+
<View style={[styles.container, this.props.style]}>
147142
{this.renderAnimatedTextInput()}
148143
{this.renderIcon()}
149144
</View>

0 commit comments

Comments
 (0)