-
-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #414 from Sambashivarao-Boyina/SearchFeature
The Search Feature of Skills cirteria implement from one skill to mutliple Skills
- Loading branch information
Showing
4 changed files
with
159 additions
and
52 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { FaTimes } from 'react-icons/fa'; | ||
|
||
//it is the design of each skill box | ||
export default function SearchSkill({ skill, setSearchSkills }) { | ||
const handleRemoveSkill = (value) => { | ||
setSearchSkills((prev) => { | ||
return prev.filter((prevSkill) => prevSkill !== skill); | ||
}); | ||
}; | ||
|
||
return ( | ||
<div className=" m-2 flex flex-row items-center rounded-md border-2 border-[#00A6FB] bg-[#00A6FB] p-2 text-black transition-colors duration-1000 ease-in-out hover:bg-white hover:text-[#00A6FB] dark:text-white dark:hover:bg-[#141D2F]"> | ||
<p className="mr-4">{skill}</p> | ||
<FaTimes | ||
onClick={() => { | ||
handleRemoveSkill(skill); | ||
}} | ||
/> | ||
</div> | ||
); | ||
} |
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,11 @@ | ||
import SearchSkill from './SearchSkill'; | ||
|
||
export default function SearchSkillsContainer({ searchSkills, setSearchSkills }) { | ||
return ( | ||
<div className="relative mt-2 flex min-h-20 w-full flex-row flex-wrap rounded-lg bg-white p-2 dark:bg-[#1E2A47]"> | ||
{searchSkills.map((skill, idx) => { | ||
return <SearchSkill skill={skill} key={idx} setSearchSkills={setSearchSkills} />; | ||
})} | ||
</div> | ||
); | ||
} |