summaryrefslogtreecommitdiff
path: root/src/components/projects/ProjectActionButtons.js
blob: 66eb8bfa87bd21dd44afcbcb1a9fac2eb777f620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import PropTypes from "prop-types";
import React from 'react';

const ProjectActionButtons = ({projectId, onOpen, onViewUsers, onDelete}) => (
    <div className="project-icons">
        <div className="open" title="Open this project" onClick={() => onOpen(projectId)}>
            <span className="fa fa-play"/>
        </div>
        <div className="users" title="View and edit collaborators on this project"
             onClick={() => onViewUsers(projectId)}>
            <span className="fa fa-users"/>
        </div>
        <div className="delete" title="Delete this project" onClick={() => onDelete(projectId)}>
            <span className="fa fa-trash"/>
        </div>
    </div>
);

ProjectActionButtons.propTypes = {
    projectId: PropTypes.number.isRequired,
    onOpen: PropTypes.func,
    onViewUsers: PropTypes.func,
    onDelete: PropTypes.func,
};

export default ProjectActionButtons;