summaryrefslogtreecommitdiff
path: root/src/components/simulations/SimulationActionButtons.js
blob: 1cb80c9450deadb3cdc06f04109a86dd54b6dc99 (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';
import {Link} from "react-router-dom";

const SimulationActionButtons = ({simulationId, onViewUsers, onDelete}) => (
    <td className="simulation-icons">
        <Link to={"/simulations/" + simulationId} className="open" title="Open this simulation">
            <span className="fa fa-play"/>
        </Link>
        <div className="users" title="View and edit collaborators"
             onClick={() => onViewUsers(simulationId)}>
            <span className="fa fa-users"/>
        </div>
        <div className="delete" title="Delete this simulation" onClick={() => onDelete(simulationId)}>
            <span className="fa fa-trash"/>
        </div>
    </td>
);

SimulationActionButtons.propTypes = {
    simulationId: PropTypes.number.isRequired,
    onViewUsers: PropTypes.func,
    onDelete: PropTypes.func,
};

export default SimulationActionButtons;