TextInput.Icon
Add-on component for text input.
How to use
import React from 'react';
import {TextInput} from '@gyri/native-ui-components';
const App = ({style, className}) => {
const [text, setText] = React.useState('');
return (
<TextInput
label="Password"
secureTextEntry
right={<TextInput.Icon icon="eye" style={style} className={className} />}
/>
);
}
export default App
Props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | style | object | Custom style object | ||
| 2 | className | string | '' | It defined nativewind style classes. | |
| 3 | icon | Icon to show. | |||
| 4 | color | Color of the icon or a function receiving a boolean indicating whether the TextInput is focused and returning the color. | |||
| 5 | rippleColor | Color of the ripple effect. |
For more details https://callstack.github.io/react-native-paper/docs/components/TextInput/TextInputIcon