fixed bug related to flexbox preventing accordion logic on mobile. need to fix skill cards position on desktop
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user