-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create a dynamic Skill Bar component to showcase each skill wit…
…h icon and customisable progress bar
- Loading branch information
1 parent
7b720a7
commit 6e275ee
Showing
3 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,27 @@ | ||
import { motion } from "motion/react"; | ||
|
||
const SkillBar = ({ logoName, icon: Icon, percentage = 100 }) => { | ||
return ( | ||
<div className="mt-2 flex w-64 flex-col gap-2 text-dark-blue dark:text-custom-yellow"> | ||
<div className="flex items-center justify-between"> | ||
<Icon className="text text-4xl" /> | ||
<span className="select-none font-semibold">{logoName}</span> | ||
</div> | ||
<div className="h-1 w-full overflow-hidden rounded-full bg-white"> | ||
<motion.div | ||
className="h-1 rounded-full bg-light-blue dark:bg-custom-violet" | ||
initial={{ width: 0 }} | ||
animate={{ width: `${percentage}%` }} | ||
transition={{ | ||
type: "spring", | ||
stiffness: 120, | ||
damping: 10, | ||
duration: 1, | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SkillBar; |
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
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