-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
workout card
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |