[EuiAccordion] Migrate from class to function component
Open
help wanted
low hanging fruit
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 911
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 65
Description
`EuiAccordion` is a collapsible content container with open/close toggle. Commonly used for progressive disclosure UI patterns.
- **File:** `components/accordion/accordion.tsx`
- **Class size:** 123 lines
- **State:** `isOpen`
- **Lifecycle:** None
**Migration notes:**
Simple — single boolean state, no lifecycle methods. The component is wrapped with `withEuiTheme` HOC which may also be replaceable with `useEuiTheme` hook.
**Acceptance criteria:**
- [ ] Convert to function component with `useState`
- [ ] Replace `withEuiTheme` HOC with `useEuiTheme` hook if applicable
- [ ] Maintain controlled/uncontrolled open state behavior
- [ ] All existing tests pass
Contributor guide
Assessment
This issue has not been assessed yet.