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

Migrate Tabs to Chakra #8673

Merged
merged 2 commits into from
Nov 28, 2022
Merged

Migrate Tabs to Chakra #8673

merged 2 commits into from
Nov 28, 2022

Conversation

amit-ksh
Copy link
Contributor

@amit-ksh amit-ksh commented Nov 19, 2022

Description

Migrate the Tabs component from emotion to chakra

Related Issue

Closes #8639

@gatsby-cloud
Copy link

gatsby-cloud bot commented Nov 19, 2022

✅ ethereum-org-website-dev deploy preview ready

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @amit-ksh thanks for the PR.

I think the styles are correct for this but for the Tabs case, we wanted to completely remove this component and start using the Chakra's Tabs instead. Declaring a new theme under https://github.com/ethereum/ethereum-org-website/tree/dev/src/%40chakra-ui/gatsby-plugin/components as it was described in the issue #8639

You can take as an example how we did this with the Button component here https://github.com/ethereum/ethereum-org-website/blob/dev/src/%40chakra-ui/gatsby-plugin/components/Button.ts

LMK if you need help on defining the new variant for this case. I think we should override the enclosed variant as it is pretty similar to our implementation.

@amit-ksh
Copy link
Contributor Author

Hey @pettinarip! I tried overriding the enclosed variant, but it removes the bottom border when a Tab is selected. And adding border style for selected Tab was not overriding it, so should I create a brand new variant like primary for the custom style and use it as the default variant for Tabs?

@pettinarip
Copy link
Member

Yes @amit-ksh please, that sounds good. We can refactor the name later if we need to.

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 nice!

@pettinarip pettinarip merged commit 605c566 into ethereum:dev Nov 28, 2022
@corwintines corwintines mentioned this pull request Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Tabs.tsx to Chakra
3 participants