fixed bug related to flexbox preventing accordion logic on mobile. need to fix skill cards position on desktop

This commit is contained in:
Joshua Ashton
2024-12-31 13:48:49 -07:00
parent 011c690d2a
commit 50aa2c8ccf
5 changed files with 50 additions and 81 deletions
+6 -9
View File
@@ -2,17 +2,14 @@ import React, { useState } from "react";
// TODO: Add state which only allows one skill card at a time to be expanded.
// TODO: Ensure that the expandability of the skill card is only an option when @media max-width 790px (mobile)
const SkillCard = ({ header, symbol, list, initState, isActive, onToggle }) => {
const [isExpanded, setIsExpanded] = useState(initState || isActive);
const toggleExpansion = () => {
setIsExpanded(!isExpanded);
const SkillCard = ({ header, symbol, list, isActive, onToggle }) => {
function test() {
console.log("click detected");
onToggle();
};
}
return (
<div className={`card shadow ${isActive ? "active-skill-card" : ""}`}>
<div className="skill-section-header" onClick={() => toggleExpansion()}>
<div className="card shadow">
<div className="skill-card-header" onClick={() => test()}>
<span className="material-icons skill-symbol">{symbol}</span>
<h3>{header}</h3>
</div>