react-native-currency-input icon indicating copy to clipboard operation
react-native-currency-input copied to clipboard

Would be really useful to pass the TextInput component to use

Open chrishenx opened this issue 2 years ago • 1 comments

Adding an optional prop to specify the input component to render would be a super nice addition to use any input out there, like the one from React Native Elements:

Seems like a small change that would allow several uses cases for integration with other UI libraries.

import View from "react-native";
import CurrencyInput from "react-native-currency-input";
import { Input } from "@rneui/themed";

function MyComponent() {
    return (
        <View>
            <CurrencyInput
              prefix="$ "
              onBlur={onBlur}
              onChangeValue={onChange}
              value={value}
              style={styles.input}
              inputComponent={Input}
            />
        </View>
    );
}

chrishenx avatar Aug 20 '22 07:08 chrishenx

you can do this now, right? renderTextInput={props => <Input {...props />}

nandorojo avatar May 06 '23 21:05 nandorojo