Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accordion]: customize open and close icon #926

Merged
merged 9 commits into from
Nov 30, 2022

Conversation

AbhinavMV
Copy link
Collaborator

@AbhinavMV AbhinavMV commented Nov 28, 2022


name: 'Pull request'
about: A new pull request

New Pull Request

Checklist

  • I am not disclosing a vulnerability.
  • My code is conform the code style
  • I have made corresponding changes to the documentation
  • I have updated Typescript definitions when needed

Issue Description

Related issue: #FILL_THIS_OUT

Solution Description

image


Reasons to use react-animate-height instead of max-height solution
Max height was set to content height when it was opened the first time, if the content expanded after being opened then it was not taken into consideration.
Now let's say we take that into consideration -> by setting max-height='max-content' in the onTransitionEnd callback.
The solution works but the transition on closing the accordion stops working.

After research found that max-height is just a hacky way to solve this problem. So instead it would be better to use this package that does the work for us and also helps us to remove many state variables 😄

@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2022

🦋 Changeset detected

Latest commit: bb4e37d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web3uikit/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AbhinavMV AbhinavMV changed the title add icon customization to accordion [Accordion]: customize open and close icon Nov 28, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2022

size-limit report 📦

Path Size
packages/core/dist/index.js 291.16 KB (+0.58% 🔺)
packages/icons/dist/index.es.js 126.63 KB (0%)
packages/web3/dist/index.js 1.46 MB (+0.02% 🔺)
packages/web3uikit/dist/index.js 1.85 MB (+0.07% 🔺)

@AbhinavMV AbhinavMV merged commit 0d5f6d3 into master Nov 30, 2022
@AbhinavMV AbhinavMV deleted the feat-accordion-new-styles branch November 30, 2022 05:43
@github-actions github-actions bot mentioned this pull request Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants