-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from monicavarhale/prismTypography
feat(typography): Add typography(colors, spacing, textSizes) to prism
- Loading branch information
Showing
11 changed files
with
271 additions
and
175 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 |
---|---|---|
@@ -1,59 +1,41 @@ | ||
### Pacific | ||
### Heliotrope | ||
|
||
```color-palette|horizontal | ||
colors: !import pacific | ||
colors: !import heliotrope | ||
``` | ||
|
||
### Sierra | ||
|
||
```color-palette|horizontal | ||
colors: !import sierra | ||
``` | ||
|
||
### Cascade | ||
|
||
```color-palette|horizontal | ||
colors: !import cascade | ||
``` | ||
|
||
### Rocky | ||
|
||
```color-palette|horizontal | ||
colors: !import rocky | ||
``` | ||
|
||
### Ridge | ||
### Cruz | ||
|
||
```color-palette|horizontal | ||
colors: !import ridge | ||
colors: !import cruz | ||
``` | ||
|
||
### Yosemite | ||
### Alert | ||
|
||
```color-palette|horizontal | ||
colors: !import yosemite | ||
colors: !import alert | ||
``` | ||
|
||
### Helen | ||
### Caution | ||
|
||
```color-palette|horizontal | ||
colors: !import helen | ||
colors: !import caution | ||
``` | ||
|
||
### Malibu | ||
### positive | ||
|
||
```color-palette|horizontal | ||
colors: !import malibu | ||
colors: !import positive | ||
``` | ||
|
||
### Catalina | ||
### Onyx | ||
|
||
```color-palette|horizontal | ||
colors: !import catalina | ||
colors: !import onyx | ||
``` | ||
|
||
### Cruz | ||
### White | ||
|
||
```color-palette|horizontal | ||
colors: !import cruz | ||
colors: !import white | ||
``` |
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
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,45 @@ | ||
import { pageLoader } from "catalog"; | ||
|
||
import { colors, typography } from "../../../src/theme"; | ||
import { Container, Row, Column } from "../../../src/components/Grid"; | ||
|
||
const textStyle = { | ||
backgroundColor: colors.white.base, | ||
padding: "20px", | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
fontSize: typography.size.bronto | ||
}; | ||
|
||
const fontWeightLabelStyle = { | ||
padding: "10px", | ||
textAlign: "center" | ||
}; | ||
|
||
const fontSizeRowStyle = { | ||
padding: "20px", | ||
display: "flex", | ||
alignItems: "center" | ||
}; | ||
|
||
const getFontWeightTextStyle = props => ({ | ||
...textStyle, | ||
...props | ||
}); | ||
|
||
export default { | ||
path: "/typography", | ||
title: "Typography", | ||
imports: { | ||
colors, | ||
typography, | ||
Container, | ||
Row, | ||
Column, | ||
getFontWeightTextStyle, | ||
fontWeightLabelStyle, | ||
fontSizeRowStyle | ||
}, | ||
content: pageLoader(() => import("./index.md")) | ||
}; |
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,98 @@ | ||
### Font Weights | ||
|
||
```react | ||
<Container> | ||
<Row> | ||
<Column medium={3}> | ||
<div style={getFontWeightTextStyle({fontWeight: typography.weight.light})}>Aa</div> | ||
<div style={fontWeightLabelStyle}>Light</div> | ||
</Column> | ||
<Column medium={3}> | ||
<div style={getFontWeightTextStyle({fontWeight: typography.weight.regular})}>Aa</div> | ||
<div style={fontWeightLabelStyle}>Regular</div> | ||
</Column> | ||
<Column medium={3}> | ||
<div style={getFontWeightTextStyle({fontWeight: typography.weight.semiBold})}>Aa</div> | ||
<div style={fontWeightLabelStyle}>Semi Bold</div> | ||
</Column> | ||
<Column medium={3}> | ||
<div style={getFontWeightTextStyle({fontWeight: typography.weight.extraBold})}>Aa</div> | ||
<div style={fontWeightLabelStyle}>Extra Bold</div> | ||
</Column> | ||
</Row> | ||
</Container> | ||
``` | ||
|
||
### Font Sizes | ||
|
||
```react | ||
const str = "Better is together"; | ||
<Container> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2} >12 px</Column> | ||
<Column medium={6} style={{fontSize: "12px"}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>14 px</Column> | ||
<Column medium={6} style={{fontSize: "14px"}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>16 px</Column> | ||
<Column medium={6} style={{fontSize: "16px"}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>20 px</Column> | ||
<Column medium={6} style={{fontSize: "20px"}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>24 px</Column> | ||
<Column medium={6} style={{fontSize: "24px"}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>32 px</Column> | ||
<Column medium={6} style={{fontSize: "32px"}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>46 px</Column> | ||
<Column medium={6} style={{fontSize: "42px"}}>{str}</Column> | ||
</Row> | ||
</Container> | ||
``` | ||
|
||
### Text Variations | ||
|
||
```react | ||
const str = "Better is together"; | ||
<Container> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2} >Primary</Column> | ||
<Column medium={6} style={{color: colors.onyx.base}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>Seconday</Column> | ||
<Column medium={6} style={{color: colors.onyx.light}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>Disabled</Column> | ||
<Column medium={6} style={{color: colors.onyx.muted}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>Alert</Column> | ||
<Column medium={6} style={{color: colors.alert.base}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>Caution</Column> | ||
<Column medium={6} style={{color: colors.caution.base}}>{str}</Column> | ||
</Row> | ||
<Row style={fontSizeRowStyle}> | ||
<Column medium={2}>Affirming</Column> | ||
<Column medium={6} style={{color: colors.positive.base}}>{str}</Column> | ||
</Row> | ||
</Container> | ||
``` |
Oops, something went wrong.