-
Notifications
You must be signed in to change notification settings - Fork 646
Core Concepts docs #521
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
Core Concepts docs #521
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 is awesome! 💯 Left a few questions 😄
|
|
||
|
|
||
| ## Responsive props | ||
| It's really easy to set different values for most of our component props based on screen size! We take advantage of [styled-system](https://github.com/styled-system/styled-system)'s responsive props API in our components. |
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.
most of our component props
Aren't all system props responsive?
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.
All system props are, not all component props
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 clarify that all systems props are responsive here?
Also, are any non-system props responsive?
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.
No non-system props are responsive
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.
There isn't really an easy way to let a user know which props are "system props" and which aren't - that's why I intentionally left this vague.
|
|
||
| We categorize our components into 3 general types. Building block components, pattern components, and helper components. Understanding how these types of components interact with each other can help you better understand how to get the most out of Primer Components. | ||
|
|
||
| - Building Blocks |
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.
The difference between "building block" components and "helper" components is still a little fuzzy to me. I'm curious to hear what @broccolini thinks about these categories.
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.
Building block components are components that represent really small pieces of UI vs helper components which don't always render anything visually, but main purpose is to standardize usage of tricky parts of the CSS API. I think it's an important distinction, but as I mentioned in show n tell, sometimes there can be some grey area, which is OK in my opinion!
Co-Authored-By: Cole Bemis <colebemis@github.com>
This PR adds a Core Concepts doc to have a quick page that goes over some of the core concepts of Primer Components and practices that are often overlooked.