ItsJonQ / g2

✨ An experimental reimagining of WordPress components
http://g2-components.com/
MIT License
105 stars 12 forks source link

Accordion: Replace zustand state management with useReducer #220

Closed ItsJonQ closed 3 years ago

ItsJonQ commented 3 years ago

This update replaces the state management of the Accordion component with React's useReducer. This can be used in the Accordion story of Storybook.

Clicking on items should collapse other items in the same group. The two Accordions should synchronize.

Screen Capture on 2021-01-12 at 13-34-59

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/itsjonq/g2/2rzlfvoei
✅ Preview: https://g2-git-update-accordion-to-use-reducer.itsjonq.vercel.app

ItsJonQ commented 3 years ago

like to pair on adding types to this

I'd love to 🍐 on types :D