Skip to content

Commit

Permalink
Merge pull request #22 from Iraq-WBC-Capstones-2020/#7-workout-card
Browse files Browse the repository at this point in the history
workout card
  • Loading branch information
osamaakb authored Aug 6, 2020
2 parents 1126e4c + 42e4907 commit 4b743d4
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/components/Card/WorkoutCard/WorkoutCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import clockicon from './icons/clockicon.svg';
import propTypes from 'prop-types';
import trainingicon from './icons/trainingicon.svg';

function WorkoutCard({ workout }) {
return (
<div className="max-h-lg max-w-sm sm:w-1/2 lg:w-1/4 overflow-hidden shadow-lg">
<img className="w-full" src={workout.image} alt={workout.title} />
<div className="p-3">
<div className="flex justify-center items-center font-bold text-xl text-center text-darkgray">
{workout.title}
</div>
</div>
<div className="flex justify-around pb-3 items-center">
<div className="flex items-center flex-col">
<img src={trainingicon} alt="trainingicon" className="h-6 w-6" />
<span className="text-darkgray pt-1">{workout.type}</span>
</div>
<div className="absolute h-10 border-l-2 border-darkgray"></div>
<div className="flex items-center flex-col">
<img src={clockicon} alt="clockicon" className="h-6 w-6" />
<span className="text-darkgray pt-1">{workout.duration}</span>
</div>
</div>
</div>
);
}

WorkoutCard.propTypes = {
workout: propTypes.object,
};

export default WorkoutCard;
6 changes: 6 additions & 0 deletions src/components/Card/WorkoutCard/icons/clockicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/components/Card/WorkoutCard/icons/trainingicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/tailwind.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

0 comments on commit 4b743d4

Please sign in to comment.