Skip to content

Instantly share code, notes, and snippets.

View mayeedwin's full-sized avatar
🚩
Tooling...

Maye Edwin mayeedwin

🚩
Tooling...
View GitHub Profile
@mayeedwin
mayeedwin / accordion.js
Created January 11, 2024 20:33
Accordion
const AccordionItem = ({ result }) => {
const [isOpen, setIsOpen] = useState(false);
const toggleOpen = () => setIsOpen(!isOpen);
return (
<div className="border-b border-gray-200">
<button
className="w-full py-2 px-4 text-left bg-white"
onClick={toggleOpen}>