Skip to content

Add Accordion to the library #419

@huyenltnguyen

Description

@huyenltnguyen

Description

In order to implement the nested super block view, I added headlessui as a dependency to the /learn client (so that we can iterate more quickly).

However, going forward, we should have an Accordion component in the freecodecamp/ui library and replace the direct headlessui import in /learn with this.

There are multiple places using accordion in /learn, and the accordions look different from each other, so I think the component should be named HeadlessAccordion to allow custom styling. Once we have standardized the styles, we can export a separate Accordion component that builds off of the headless one.

Ref: https://github.com/freeCodeCamp/freeCodeCamp/pull/56941/files#diff-a0e7c3d0df31e6f51a3ea780768349415b4f932b5255c0047f2db94c26d6acf9R4-R5.

Metadata

Metadata

Assignees

Labels

release: minorChanges that would go in a minor release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions