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

feat(TabMenu) - Adding TabMenu to UI kit (with correct rebasing) #19

Merged
merged 22 commits into from
Mar 19, 2021

Conversation

ChefHutch
Copy link
Contributor

@ChefHutch ChefHutch commented Mar 18, 2021

I did a horrible rebase on the OG PR, here is the new one with the correct rebasing 🙏

Added new components to the UIKit:

Exported:

  • TabMenu
  • Tab
  • Interfaces: TabMenuProps, TabProps

Not exported:

  • StyledTabMenu
  • StyledTab

Details

  • TabMenu maps over child elements in an almost-identical way to the ButtonMenu
  • An array of child element onClicks set the activeIndex depending on the index of the child that has been clicked
  • StyledTabMenu is responsible for the space between the buttons, and the elements' bottom-border
  • StyledTab is a styled html button, with dynamic color/background-color depending on whether it is selected. Below 572px the tab elements flex-grow to fill the available space. overflow-y is set to scroll so these elements become scrollable if they break out of the container.

Questions

  • Should Tab be separated into its own package?
  • Note the quite extensive yarn.lock changes in the root. I can revert these if they're alarming?

Screenshot 2021-03-16 at 15 23 27

@ChefHutch ChefHutch force-pushed the feature/tab-bar-rebase-2 branch from e6caf40 to 46a9c1e Compare March 18, 2021 10:59
@ChefHutch ChefHutch mentioned this pull request Mar 18, 2021
@ChefHutch ChefHutch force-pushed the feature/tab-bar-rebase-2 branch from e4ece63 to 89cf269 Compare March 18, 2021 11:25
@ChefHutch ChefHutch changed the title Feature/tab bar - second attempt at rebasing feat(TabMenu) - Adding TabMenu to UI kit (with correct rebasing) Mar 18, 2021
@ChefHutch ChefHutch marked this pull request as ready for review March 18, 2021 11:29
@hachiojidev hachiojidev merged commit 8061551 into pancakeswap:master Mar 19, 2021
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