24 lines
557 B
JavaScript
24 lines
557 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,
|
|
};
|