import React from 'react';
import PropTypes from 'prop-types';

import { TouchableOpacity } from 'react-native';
import { Icon } from 'react-native-elements';

export default function BackIcon({ action }) {
    return (
        <TouchableOpacity onPress={action}>
            <Icon name="ei-chevron-left" type="evilicons" size={28} />;
        </TouchableOpacity>
    );
}

BackIcon.propTypes = {
    action: PropTypes.func.isRequired,
};
