-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExerciseItem.js
More file actions
25 lines (20 loc) · 820 Bytes
/
ExerciseItem.js
File metadata and controls
25 lines (20 loc) · 820 Bytes
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
import React from 'react';
import { Row, Col } from "shards-react";
const ExerciseItem = ({exercise, choosenExercisesArray, updateExercisesArray}) => {
const deleteHandler = () => {
updateExercisesArray(choosenExercisesArray.filter((el) => el.id !== exercise.id));
};
return(
<Row className="mb-2">
<Col xs="1" className="pl-2">
<button onClick={deleteHandler} className="trash-btn">
<i className="fas fa-trash"></i>
</button>
</Col>
<Col xs="11">
<h3 className="text-white"><span className="repeats">{exercise.repeats} x </span> {exercise.name}</h3> Duration per set: {exercise.time}
</Col>
</Row>
);
};
export default ExerciseItem;