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: Adds tokens to Accordion #126

Merged
merged 3 commits into from
Jun 28, 2022
Merged

Conversation

hellofanny
Copy link
Contributor

@hellofanny hellofanny commented Jun 28, 2022

Ported from https://github.com/vtex-sites/nextjs.store/pull/130

What's the purpose of this pull request?

This PR applies the new Theming structure to Accordion: new scoped tokens linked to global ones.

How does it work?

This PR uses local variables to parameterize the Accordion properties, then connects these scoped tokens to the global ones.

New local tokens for Accordion

Local token Default value/Global token linked
--fs-accordion-item-border-bottom-width 1px
--fs-accordion-item-border-bottom-color var(--fs-border-color-light)
--fs-accordion-item-button-padding var(--fs-spacing-3) 0
--fs-accordion-item-button-color var(--fs-color-text)
--fs-accordion-item-button-bkg-color transparent
--fs-accordion-item-button-notebook-padding-right var(--fs-spacing-4)
--fs-accordion-item-button-notebook-padding-left var(--fs-accordion-item-button-notebook-padding-right)
--fs-accordion-item-panel-notebook-padding-right var(--fs-spacing-4)
--fs-accordion-item-panel-notebook-padding-left var(--fs-accordion-item-panel-notebook-padding-right)

How to test it?

  • The Accordion component and its related components should look just as it was before these changes.
  • You can check the story on Storybook.

Checklist

You may erase this after checking them all ;)

Changelog

  • Added an entry in the CHANGELOG.md at the beginning of its due section. The latest version should comes first.
  • Added the PR number with the PR link at the entry in the CHANGELOG.md. E.g., New items in the pull_request_template.md (#12)

PR Description

  • Added a label according to the PR goal - Breaking change, Enhancement, Bug or Chore.
  • Added the component, hook, or pathname in-between backticks (``) - If applicable. E.g., ComponentName component.
  • Identified the function or parameter in the PR - If applicable. E.g., useWindowDimensions hook.

Documentation

  • PR description
  • Added to/Updated the Storybook - if applicable.
  • For documentation changes, ping @ carolinamenezes, @ PedroAntunesCosta or @ Mariana-Caetano to review and update.

@vercel
Copy link

vercel bot commented Jun 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
gatsby-store-storybook ✅ Ready (Inspect) Visit Preview Jun 28, 2022 at 0:36AM (UTC)

@hellofanny hellofanny added Documentation Improvements or additions to documentation Chore General tasks. labels Jun 28, 2022
@vtex-sites
Copy link

vtex-sites bot commented Jun 28, 2022

Preview is ready

This pull request generated a Preview

👀   Preview: https://sfj-3c56c2d--gatsby.preview.vtex.app
🔬   Go deeper by inspecting the Build Logs
📝   based on commit 3c56c2d

@vtex-sites
Copy link

vtex-sites bot commented Jun 28, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit 3c56c2d

Lighthouse Report by page
📎   /
📎   /apple-magic-mouse/p
📎   /office

Copy link
Collaborator

@renatamottam renatamottam left a comment

Choose a reason for hiding this comment

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

Approving cuz it looks the same as https://github.com/vtex-sites/nextjs.store/pull/130

Copy link
Contributor

@lucasfp13 lucasfp13 left a comment

Choose a reason for hiding this comment

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

Nice! 💯

@hellofanny hellofanny merged commit 3c56c2d into main Jun 28, 2022
@hellofanny hellofanny deleted the feat/theming-accordion-fsss-372 branch June 28, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore General tasks. Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants