locaft_mobile/components/helpers/IconLabel.js

36 lines
693 B
JavaScript
Raw Permalink Normal View History

2022-05-14 09:26:15 -07:00
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { Icon } from 'react-native-elements';
const IconLabel = ({ name, label, color }) => {
return (
<View style={styles.container}>
<Icon
name={name}
type="ionicon"
size={14}
color={color}
style={styles.iconStyle}
/>
<Text style={styles.labelStyle}>{label}</Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
marginRight: 10,
alignItems: 'center',
},
labelStyle: {
fontSize: 12,
color: 'white',
},
iconStyle: {
marginRight: 2,
},
});
export default IconLabel;