design-react-kit
design-react-kit copied to clipboard
[BUG] Add animations to the mobile menu in the header
Describe the bug The mobile menu in the header doesn't have an entering and a leaving animation.
Expected behavior The menu should be animated like in the BI library. (See for instance the mobile menu of https://innovazione.gov.it/)
I would love to tackle this. What do you think of the following solution?
in Collapse.tsx
instead of toggling the display
property we use the classic transformX, as follows
<CollapseBase
className={classes}
cssModule={{ 'navbar-collapse': 'navbar-collapsable' }}
navbar={navbar}
style={{transform: isOpen ? 'translateX(0)' : 'translateX(-100%)'}}
{...attributes}
>
As far as I can see, it implements the desired behaviour, but someone with more knowledge of the codebase may differ! ~~Let me know and I will open a PR :)~~
I went ahead and opened the PR so that you can clearly so what the solution would look like https://github.com/italia/design-react-kit/pull/775
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please read https://github.com/italia/design-react-kit/discussions/886.