From ae646005a3758af54756f5395034b6509fc7c583 Mon Sep 17 00:00:00 2001 From: Ajay_S Date: Thu, 21 Apr 2022 12:56:58 +0530 Subject: [PATCH] completed skill information page component --- .../SkillInformationStep.module.scss | 3 + .../SkillInformationStep.tsx | 61 ++++++++++++++----- .../SkillsCard.module.scss | 7 ++- src/pages/skillInformationStep/SkillsCard.tsx | 5 +- 4 files changed, 60 insertions(+), 16 deletions(-) diff --git a/src/pages/skillInformationStep/SkillInformationStep.module.scss b/src/pages/skillInformationStep/SkillInformationStep.module.scss index eaefc17..4fe6765 100644 --- a/src/pages/skillInformationStep/SkillInformationStep.module.scss +++ b/src/pages/skillInformationStep/SkillInformationStep.module.scss @@ -38,6 +38,9 @@ ion-content { } .button{ + a { + text-decoration: none; + } ion-button { margin: 5rem 2rem; --background: var(--primary-button-color); diff --git a/src/pages/skillInformationStep/SkillInformationStep.tsx b/src/pages/skillInformationStep/SkillInformationStep.tsx index c120317..36184a5 100644 --- a/src/pages/skillInformationStep/SkillInformationStep.tsx +++ b/src/pages/skillInformationStep/SkillInformationStep.tsx @@ -16,9 +16,40 @@ import MongoDBIcon from '../../assets/images/Mongo.png'; import postgreSqlIcon from '../../assets/images/PostgreSQL.png'; import FirebaseIcon from '../../assets/images/Firebase.png'; import DevOpsIcon from '../../assets/images/DevOps.png'; +import { useEffect, useState } from 'react'; +import { Link } from 'react-router-dom'; +const skills: string[] = []; const SkillInformationStep: React.FC = () => { + + const [ischanging, setChange] = useState(0); + + useEffect(() => { + + }, [skills]); + + const isSelected = (skill: string) => { + setChange(Math.random()); + + if (skills.includes(skill)) { + + const index = skills.indexOf(skill); + if (index > -1) { + skills.splice(index, 1); + } + + return; + } + skills.push(skill); + + } + + useEffect(() => { + console.log("Render"); + }, [ischanging]); + + return ( {
Front-end:
- - - - - + + + + +
@@ -53,9 +84,9 @@ const SkillInformationStep: React.FC = () => {
Back-end:
- - - + + +
@@ -65,9 +96,9 @@ const SkillInformationStep: React.FC = () => {
Database:
- - - + + +
@@ -77,14 +108,16 @@ const SkillInformationStep: React.FC = () => {
Beneficial:
- - + +
- Done! + + Done! +
diff --git a/src/pages/skillInformationStep/SkillsCard.module.scss b/src/pages/skillInformationStep/SkillsCard.module.scss index 5a5203d..bbcd53a 100644 --- a/src/pages/skillInformationStep/SkillsCard.module.scss +++ b/src/pages/skillInformationStep/SkillsCard.module.scss @@ -6,11 +6,16 @@ height: 7rem; border-radius: 2rem; justify-content: space-evenly; - + .name { color: #868686; font-size: 1.4rem; font-weight: 500; width: 8rem; } +} + +.isHighlighted { + border: 0.3rem solid #33CE9380; + box-shadow: 0px 0px 10px #00000012; } \ No newline at end of file diff --git a/src/pages/skillInformationStep/SkillsCard.tsx b/src/pages/skillInformationStep/SkillsCard.tsx index e99e982..c5629d9 100644 --- a/src/pages/skillInformationStep/SkillsCard.tsx +++ b/src/pages/skillInformationStep/SkillsCard.tsx @@ -4,11 +4,14 @@ import styles from './SkillsCard.module.scss'; interface Props { icon: string; name: string; + isHighlighted?: boolean; + isSelected: (skill: string) => void; + } const SkillsCard: React.FC = (props) => { return ( -
+
props.isSelected(props.name)}> {props.name}
{props.name}