Skip to content

Conversation

@shawnbot
Copy link
Contributor

This adds fontStyle to the list of typography props and a test that ensures it's respected. This is so that we can do the following in the Primer CSS docs:

<Text is="var" fontFamily="mono" fontStyle="normal">$blue-500</Text>

rather than:

<Text is="var" fontFamily="mono" style={{fontStyle: 'normal'}}>$blue-500</Text>

@vercel
Copy link

vercel bot commented Jan 17, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Copy link

@emplums emplums 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! The only thing is that Heading, Link and BaseStyles all also get the TYPOGRAPHY group of props, so we should probably add this test to those component's test files as well.

@shawnbot
Copy link
Contributor Author

Okay, I switched the Text test to use is="i" for clarity, and added similar tests to Heading and Link. 🚀

@emplums emplums merged commit cb7d8bb into q4-cat-toad Jan 25, 2019
@emplums emplums deleted the font-style branch January 25, 2019 20:01
@emplums emplums mentioned this pull request Jan 25, 2019
5 tasks
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.

3 participants