import PropTypes from 'prop-types';
import { PencilFill, PencilSquare, Trash3 } from 'react-bootstrap-icons';
const LinesTableRow = ({
index, line, onDelete, onEdit, onEditInPage,
}) => {
const handleAnchorClick = (event, action) => {
event.preventDefault();
action();
};
return (
{index + 1} |
{line.type.name} |
{line.price} |
{line.count} |
{line.sum} |
handleAnchorClick(event, onEdit)}> |
handleAnchorClick(event, onEditInPage)}> |
handleAnchorClick(event, onDelete)}> |
);
};
LinesTableRow.propTypes = {
index: PropTypes.number,
line: PropTypes.object,
onDelete: PropTypes.func,
onEdit: PropTypes.func,
onEditInPage: PropTypes.func,
};
export default LinesTableRow;