-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(typography): add typography docs along with spacing system
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Typography components replace standard HTML dom (preferring `<Small></Small>` over `<small></small>`) in order to provide maintainable font sizes and styles. | ||
|
||
## Spacing system | ||
|
||
As of v0.22.0, Typography components **do not** have built-in styles for spacing (padding or margin). For the interim, designers are strongly advised to follow TDS Sketch assets for spacing rules in order for developers to properly apply the correct spacing between related components. | ||
|
||
For example, a `<Paragraph />` component immediately following a `<Heading />` component would require `1rem` spacing between them. For this case, we recommend: | ||
|
||
``` | ||
<div> | ||
<Heading>Great Deals</Heading> | ||
<div style={{paddingTop: '1rem'}}> | ||
<Paragraph>See how this great deal can benefit you and your shared lines.</Paragraph> | ||
</div> | ||
</div> | ||
``` |