-
Notifications
You must be signed in to change notification settings - Fork 646
Getting started #518
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
Getting started #518
Conversation
colebemis
left a comment
There was a problem hiding this 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>`: |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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>
This PR adds documentation on how to get started using Primer Components 🎉