Code Monkey home page Code Monkey logo

react-native-element-textinput's Introduction

react-native-element-textinput's People

Contributors

hoaphantn7604 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-element-textinput's Issues

useColorScheme() to eye/uneye/close.png

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png
new file mode 100644
index 0000000..147f3f6
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png
new file mode 100644
index 0000000..c6271fd
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png
new file mode 100644
index 0000000..094866d
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png
new file mode 100644
index 0000000..7e95b8f
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png
new file mode 100644
index 0000000..98a1d01
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png
new file mode 100644
index 0000000..54c94c9
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/index.tsx b/node_modules/react-native-element-textinput/src/TextInput/index.tsx
index 0df2f66..1b6c1c6 100644
--- a/node_modules/react-native-element-textinput/src/TextInput/index.tsx
+++ b/node_modules/react-native-element-textinput/src/TextInput/index.tsx
@@ -8,13 +8,19 @@ import {
   TextStyle,
   TouchableOpacity,
   View,
+  useColorScheme,
 } from 'react-native';
 import { styles } from './styles';
 import type { InputProps } from './model';
 
-const ic_eye = require('./icon/eye.png');
-const ic_uneye = require('./icon/uneye.png');
-const ic_close = require('./icon/close.png');
+const ic_eye_dark = require('./icon/eye_dark.png')
+const ic_eye_light = require('./icon/eye_light.png')
+const ic_uneye_dark = require('./icon/uneye_dark.png')
+const ic_uneye_light = require('./icon/uneye_light.png')
+const ic_close_dark = require('./icon/close_dark.png')
+const ic_close_light = require('./icon/close_light.png')
+
+
 
 const defaultProps = {
   style: {},
@@ -93,6 +99,9 @@ const TextInputComponent: InputProps = (props) => {
   };
 
   const _renderRightIcon = () => {
+    const ic_eye = useColorScheme() === 'dark' ? ic_eye_dark : ic_eye_light
+const ic_uneye = useColorScheme() === 'dark' ? ic_uneye_dark : ic_uneye_light
+const ic_close = useColorScheme() === 'dark' ? ic_close_dark : ic_close_light
     if (showIcon) {
       if (renderRightIcon) {
         return renderRightIcon();
@@ -103,7 +112,7 @@ const TextInputComponent: InputProps = (props) => {
             <TouchableOpacity onPress={onChangeTextEntry}>
               <Image
                 source={textEntry ? ic_eye : ic_uneye}
-                style={[styles.icon, iconStyle]}
+                style={[styles.icon, iconStyle,{width:18,height:16}]}
               />
             </TouchableOpacity>
           );
diff --git a/node_modules/react-native-element-textinput/src/TextInput/styles.ts b/node_modules/react-native-element-textinput/src/TextInput/styles.ts
index 75a0baf..199aa28 100644
--- a/node_modules/react-native-element-textinput/src/TextInput/styles.ts
+++ b/node_modules/react-native-element-textinput/src/TextInput/styles.ts
@@ -27,8 +27,8 @@ export const styles = StyleSheet.create({
     flexDirection: 'row',
   },
   icon: {
-    width: 20,
-    height: 20,
+    width: 16,
+    height: 16,
   },
   textError: {
     color: 'red',

This issue body was partially generated by patch-package.

useColorScheme() to eye/uneye/close.png

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png
new file mode 100644
index 0000000..147f3f6
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png
new file mode 100644
index 0000000..c6271fd
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png
new file mode 100644
index 0000000..094866d
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png
new file mode 100644
index 0000000..7e95b8f
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png
new file mode 100644
index 0000000..98a1d01
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png
new file mode 100644
index 0000000..54c94c9
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/index.tsx b/node_modules/react-native-element-textinput/src/TextInput/index.tsx
index 0df2f66..f53538f 100644
--- a/node_modules/react-native-element-textinput/src/TextInput/index.tsx
+++ b/node_modules/react-native-element-textinput/src/TextInput/index.tsx
@@ -8,13 +8,14 @@ import {
   TextStyle,
   TouchableOpacity,
   View,
+  useColorScheme,
 } from 'react-native';
 import { styles } from './styles';
 import type { InputProps } from './model';
 
-const ic_eye = require('./icon/eye.png');
-const ic_uneye = require('./icon/uneye.png');
-const ic_close = require('./icon/close.png');
+const ic_eye = useColorScheme() === 'dark' ? require('./icon/eye_dark.png') : require('./icon/eye_light.png');
+const ic_uneye = useColorScheme() === 'dark' ? require('./icon/uneye_dark.png') : require('./icon/uneye_light.png');
+const ic_close = useColorScheme() === 'dark' ? require('./icon/close_dark.png') : require('./icon/close_light.png');
 
 const defaultProps = {
   style: {},

This issue body was partially generated by patch-package.

How to use ref?

I am unable to use ref in react-native-element-textinput

<TextInput
ref={tfRef}

    />

useColorScheme eye uneye close png

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png
new file mode 100644
index 0000000..147f3f6
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/close_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png
new file mode 100644
index 0000000..c6271fd
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/close_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png
new file mode 100644
index 0000000..094866d
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png
new file mode 100644
index 0000000..7e95b8f
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/eye_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png
new file mode 100644
index 0000000..98a1d01
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_dark.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png
new file mode 100644
index 0000000..54c94c9
Binary files /dev/null and b/node_modules/react-native-element-textinput/src/TextInput/icon/uneye_light.png differ
diff --git a/node_modules/react-native-element-textinput/src/TextInput/index.tsx b/node_modules/react-native-element-textinput/src/TextInput/index.tsx
index 0df2f66..f53538f 100644
--- a/node_modules/react-native-element-textinput/src/TextInput/index.tsx
+++ b/node_modules/react-native-element-textinput/src/TextInput/index.tsx
@@ -8,13 +8,14 @@ import {
   TextStyle,
   TouchableOpacity,
   View,
+  useColorScheme,
 } from 'react-native';
 import { styles } from './styles';
 import type { InputProps } from './model';
 
-const ic_eye = require('./icon/eye.png');
-const ic_uneye = require('./icon/uneye.png');
-const ic_close = require('./icon/close.png');
+const ic_eye = useColorScheme() === 'dark' ? require('./icon/eye_dark.png') : require('./icon/eye_light.png');
+const ic_uneye = useColorScheme() === 'dark' ? require('./icon/uneye_dark.png') : require('./icon/uneye_light.png');
+const ic_close = useColorScheme() === 'dark' ? require('./icon/close_dark.png') : require('./icon/close_light.png');
 
 const defaultProps = {
   style: {},
diff --git a/node_modules/react-native-element-textinput/src/TextInput/styles.ts b/node_modules/react-native-element-textinput/src/TextInput/styles.ts
index 75a0baf..47a2533 100644
--- a/node_modules/react-native-element-textinput/src/TextInput/styles.ts
+++ b/node_modules/react-native-element-textinput/src/TextInput/styles.ts
@@ -29,6 +29,7 @@ export const styles = StyleSheet.create({
   icon: {
     width: 20,
     height: 20,
+    backgroundColor:"red"
   },
   textError: {
     color: 'red',

This issue body was partially generated by patch-package.

ui bug in autocomplete dropdown

Hi man, when I have more than x items in data array, when I try to scroll this bug appears on dropdown(the example is in a blank app):

IMG_E84DA6B95739-1

SecureTextEntry Issue

Not able to change secureTextEntry While using a icon inside renderRightIcon onPress state is not updating the variable inside the secureTextEntry

Value not setted on autocomplete's textinput

Hi, it seems that value property of autocomplete doesn't work, can you verify this?
example: I'm filling a form for edit but the initial value of autocomplete is not displayed.
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.