@uiw/react-native
Version:
UIW for React Native
18 lines • 456 B
JavaScript
import React from 'react';
import { Platform, TextInput } from 'react-native';
import { useTheme } from '@shopify/restyle';
const Input = ({
value,
onChange,
...others
}) => {
const theme = useTheme();
const isIOS = Platform.OS === 'ios';
return <TextInput value={value} onChangeText={value => {
onChange?.(value);
}} style={{
paddingVertical: isIOS ? 5 : -5,
color: theme.colors.text
}} {...others} />;
};
export default Input;