Skip to content

Conversation

@emplums
Copy link

@emplums emplums commented Aug 14, 2019

This PR adds documentation on how to get started using Primer Components 🎉

@emplums emplums requested review from colebemis and vdepizzol August 14, 2019 00:14
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

This looks awesome! Nice work 👏 Just left a few comments and questions


## BaseStyles

In order to set basic color, font-family, and line-heights across your project, you will need to establish base Primer styles for your app by wrapping all of your Primer components in `<BaseStyles>`:
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a little unclear what "basic color" means at the beginning of this sentence. Maybe we should say "text color"?


```
import Box from '@primer/components/src/Box'
import Flex from '@primer/components/src/Flex'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be recommending that people import components like this? A few people in the #react channel have had trouble with this kind of import because the imported code isn't processed by Babel.

In theory, we should be able to make tree-shaking work with imports like import {Box, Flex} from '@primer/components', right?

Copy link
Author

Choose a reason for hiding this comment

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

That was my assumption but webpack is still pulling in all exports even though our ESM module should work with tree-shaking fine. You can follow the discussion here: #456

Emily and others added 5 commits August 16, 2019 08:14
Co-Authored-By: Cole Bemis <colebemis@github.com>
Co-Authored-By: Cole Bemis <colebemis@github.com>
Co-Authored-By: Cole Bemis <colebemis@github.com>
Co-Authored-By: Cole Bemis <colebemis@github.com>
Co-Authored-By: Cole Bemis <colebemis@github.com>
@emplums emplums merged commit 3608a8d into master Aug 16, 2019
@emplums emplums deleted the getting-started branch October 22, 2019 19:22
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