Skip to content

Commit

Permalink
Fix accordion text highlight on click
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirAgassi committed Mar 27, 2024
1 parent 2a9fd8c commit 92c8a81
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ const Accordion: React.FC<AccordionProps> = ({ items }) => {
{items.map((item, index) => (
<div key={index} className="px-3 w-full md:w-1/2 mb-5">
<div
className={`cursor-pointer flex justify-between items-center p-4 bg-white border-black rounded-xl border ${
activeIndex === index ? 'rounded-b-none' : ''
}`}
className={`cursor-pointer flex justify-between items-center p-4 bg-white border-black rounded-xl border select-none ${activeIndex === index ? 'rounded-b-none' : ''}`}
onClick={() => toggleAccordion(index)}
role="button"
>
<h6 className="text-black">{item.question}</h6>
<span
Expand Down

0 comments on commit 92c8a81

Please sign in to comment.