Files
Eventment/app/components/AppHeader/IconButtons/EventsIcon.js
2019-08-05 21:23:17 -04:00

25 lines
542 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { TouchableOpacity } from 'react-native';
import { Icon } from 'react-native-elements';
export default function EventsIcon({ action }) {
const renderEventsIcon = () => <Icon name="ei-calendar" type="evilicons" size={28} />;
if (action) {
return <TouchableOpacity onPress={action}>{renderEventsIcon()}</TouchableOpacity>;
}
return renderEventsIcon();
}
EventsIcon.propTypes = {
action: PropTypes.func,
};
EventsIcon.defaultProps = {
action: null,
};