From ea0bc16d30bd747ccdd1b751f41e75c89535c517 Mon Sep 17 00:00:00 2001 From: Anmol Arora Date: Wed, 10 Jul 2024 12:48:01 +0530 Subject: [PATCH] Update Skillset.jsx --- src/components/Skillset.jsx | 133 ++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/src/components/Skillset.jsx b/src/components/Skillset.jsx index 8b13789..2ac0a5c 100644 --- a/src/components/Skillset.jsx +++ b/src/components/Skillset.jsx @@ -1 +1,134 @@ +import React, { useState } from 'react'; +const Skillset = () => { + const [activeTab, setActiveTab] = useState('languages'); + + const handleTabClick = (tab) => { + setActiveTab(tab); + }; + + let backgroundClass = 'backGround'; + if (activeTab === 'frameworks') { + backgroundClass = 'backGround1'; + } else if (activeTab === 'tools') { + backgroundClass = 'backGround2'; + } + + const skills = { + languages: [ + { name: 'C/C++', level: 4 }, + { name: 'Python', level: 4 }, + { name: 'Java', level: 3 }, + { name: 'HTML/CSS', level: 5 }, + { name: 'Javascript', level: 4 }, + { name: 'MySQL', level: 3 }, + { name: 'MongoDB', level: 3 } + ], + frameworks: [ + { name: 'Express.js', level: 3 }, + { name: 'React.js', level: 4 }, + { name: 'NLTK', level: 4 }, + { name: 'Scikit-Learn', level: 3 }, + { name: 'Tailwind', level: 4 } + ], + tools: [ + { name: 'Git', level: 3 }, + { name: 'Github', level: 4 }, + { name: 'Postman', level: 2 }, + { name: 'Canva', level: 4 } + ] + }; + + const renderSkillBars = (level) => { + const totalStars = 5; + const barWidth = (level / totalStars) * 100; + + return ( +
+
+
+
+
+ ); + }; + + return ( +
+
+

+ Set Of + Proficiency +

+
+
+
handleTabClick('languages')} + > +
+ Core + +
+
+
handleTabClick('frameworks')} + > +
+ Supportive + +
+
+
handleTabClick('tools')} + > +
+ Casual + +
+
+
+
+
+
+
    + {skills.languages.map(skill => ( +
  • +
    {skill.name}
    +
    {renderSkillBars(skill.level)}
    +
  • + ))} +
+
+
+
    + {skills.frameworks.map(skill => ( +
  • +
    {skill.name}
    +
    {renderSkillBars(skill.level)}
    +
  • + ))} +
+
+
+
    + {skills.tools.map(skill => ( +
  • +
    {skill.name}
    +
    {renderSkillBars(skill.level)}
    +
  • + ))} +
+
+
+
+
+ ); +}; + +export default Skillset;