Skip to content

Commit 3e4678c

Browse files
committed
TextInput prop-drilling is here and IInputBarProps is extends from TextInputProps and TextInputAndroidProps
1 parent 03d7b30 commit 3e4678c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import {SafeAreaView, StatusBar} from 'react-native';
2+
import {Alert, SafeAreaView, StatusBar} from 'react-native';
33
import InputBar from './build/dist/InputBar';
44

55
const App = () => {

lib/InputBar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import {
66
StyleProp,
77
ViewStyle,
88
TextInput,
9+
TextInputProps,
10+
TextInputAndroidProps,
911
} from "react-native";
1012
import Androw from "react-native-androw";
1113
import Spinner from "react-native-spinkit";
@@ -25,11 +27,11 @@ export interface ISource {
2527
source: string | { uri: string };
2628
}
2729

28-
export interface IInputBarProps {
30+
export interface IInputBarProps extends TextInputProps, TextInputAndroidProps {
2931
style: CustomStyleProp;
3032
width?: number;
3133
height?: number;
32-
value?: string | number;
34+
value?: string;
3335
borderRadius?: number;
3436
minHeight?: number;
3537
maxHeight?: number;
@@ -146,6 +148,7 @@ class InputBar extends React.Component<IInputBarProps, IState> {
146148
]}
147149
>
148150
<TextInput
151+
{...this.props}
149152
value={value}
150153
multiline
151154
placeholder={placeholder}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@paraboly/react-native-input-bar",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Fully customizable, beautifully designed Input Bar for React Native",
55
"keywords": [
66
"input",

0 commit comments

Comments
 (0)