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

docs(storybook): add type token switcher #4359

Merged

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Oct 16, 2019

Closes #4329

This PR creates a storybook addon for modifying Carbon type token font size and line height. When a type token font size/line height pairing is selected for a particular type token, the corresponding custom properties for those rules is modified

Changelog

New

  • Carbon Type storybook addon

Changed

  • rename Carbon Theme switcher addon vars and components

Testing / Reviewing

Change type token font size/line height pairings in the new Carbon Type storybook panel

Ensure the type tokens change as expected and are reflected in the DOM and storybook

@emyarod emyarod requested a review from a team as a code owner October 16, 2019 18:40
@ghost ghost requested a review from abbeyhrt October 16, 2019 18:40
@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for the-carbon-components ready!

Built with commit e8aa2ef

https://deploy-preview-4359--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for carbon-components-react ready!

Built with commit e8aa2ef

https://deploy-preview-4359--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for carbon-elements ready!

Built with commit e8aa2ef

https://deploy-preview-4359--carbon-elements.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 - Thanks @emyarod!

Copy link
Member

@laurenmrice laurenmrice left a comment

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Out of curiosity, is there any way to quickly tell which type token applies to the component? I just changed random ones until I found one that changed the component

@joshblack
Copy link
Contributor

joshblack commented Oct 17, 2019

@abbeyhrt really the only fast way is to inspect the styles, sadly 😞 There is the SassDoc too that might help: https://github.com/carbon-design-system/carbon/blob/master/packages/components/docs/sass.md#accordion-mixin

@joshblack joshblack merged commit 987b28d into carbon-design-system:master Oct 17, 2019
@emyarod emyarod deleted the 4329-type-token-switcher branch October 17, 2019 16:42
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.

Add ability to change type tokens in theme switcher
5 participants