mfrag38-react-native-textinput-with-icons-full
Version:
small react native package help you to make a material text input and allow you to add icons to the left and right side and icons have onPress feature
69 lines (62 loc) • 1.43 kB
JavaScript
import React from 'react';
import IonIcons from 'react-native-vector-icons/Ionicons';
import MaterialDesignIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import OctIcons from 'react-native-vector-icons/Octicons';
import EvilIcons from 'react-native-vector-icons/EvilIcons';
import AwesomeIcons from 'react-native-vector-icons/FontAwesome';
const IonIcon = ({ icon, size, color, style, onPress }) => {
return (
<IonIcons
name={icon}
size={size}
style={style}
color={color}
onPress={onPress}
/>
);
};
const MaterialDesignIcon = ({ icon, size, color, style, onPress }) => {
return (
<MaterialDesignIcons
name={icon}
size={size}
style={style}
color={color}
onPress={onPress}
/>
);
};
const OctIcon = ({ icon, size, color, style, onPress }) => {
return (
<OctIcons
name={icon}
size={size}
style={style}
color={color}
onPress={onPress}
/>
);
};
const EvilIcon = ({ icon, size, color, style, onPress }) => {
return (
<EvilIcons
name={icon}
size={size}
style={style}
color={color}
onPress={onPress}
/>
);
};
const AwesomeIcon = ({ icon, size, color, style, onPress }) => {
return (
<AwesomeIcons
name={icon}
size={size}
style={style}
color={color}
onPress={onPress}
/>
);
};
export { IonIcon, MaterialDesignIcon, OctIcon, EvilIcon, AwesomeIcon };