EightfoldAI / octuple

The Octuple component library
MIT License
16 stars 45 forks source link

feat: accordion: adds rendercontentalways prop managed by expanded #816

Closed dkilgore-eightfold closed 2 months ago

dkilgore-eightfold commented 2 months ago

SUMMARY:

We useEffect to first check if renderContentAlways is true. If it is, we set shouldRender to true and skip the rest of the checks. If renderContentAlways is false, we then check if expanded is true. If it is, we set shouldRender to true and clear any existing timeout. If expanded is false, we start a timeout that sets shouldRender to false after 400ms, affording time for the animation to complete.

https://github.com/EightfoldAI/octuple/assets/99700808/ca9a3c01-b74a-4f85-8772-2d2675a7ecc4

JIRA TASK (Eightfold Employees Only):

ENG-86284

CHANGE TYPE:

TEST COVERAGE:

TEST PLAN:

Pull the PR branch and run yarn and yarn storybook. Verify the Accordion stories behave as expected.

codesandbox-ci[bot] commented 2 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.