Skip to content

Commit

Permalink
feat: use Inter for base type (#574)
Browse files Browse the repository at this point in the history
* feat(style): use Inter for base type

* test: update snaps

* chore: remove unused import

* chore: update snaps

* fix: require inter font

* feat: add import

* fix: remove unused imports

Co-authored-by: shanberg <98312+shanberg@users.noreply.github.com>
Co-authored-by: kaitmore <kaitmore@gmail.com>
  • Loading branch information
3 people committed Sep 23, 2020
1 parent 150a9f4 commit a4eed1a
Show file tree
Hide file tree
Showing 37 changed files with 96 additions and 91 deletions.
3 changes: 0 additions & 3 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import React from "react";
import { configure, addDecorator, addParameters } from "@storybook/react";
import { withA11y } from "@storybook/addon-a11y";
import { withInfo } from "@storybook/addon-info";
import { withOptions } from "@storybook/addon-options";
import { withKnobs } from "@storybook/addon-knobs";
import { setDefaults } from "react-storybook-addon-props-combinations";
import { withThemesProvider } from "storybook-addon-styled-component-theme";
import gmTheme from "./gmTheme";

import PropTypesTable from "./PropTypesTable";
import StoryContainer from "ComponentLibrary/StoryComponents/StoryContainer";
import { keen, keenDark } from "style/theme";
import { transparentize } from "polished";

const req = require.context("../src/", true, /\.stories\.js$/);

Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"styled-components": "^4"
},
"dependencies": {
"polished": "^3.4.2"
"polished": "^3.4.2",
"typeface-inter": "^3.12.0"
},
"scripts": {
"build": "webpack -p",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports[`AppFooter should match snapshot 1`] = `
"FONT_SIZE_TEXT_XS": "10px",
"FONT_STACK_BRAND": "\\"Metropolis\\", \\"Helvetica Neue\\", Arial, sans-serif",
"FONT_STACK_CODE": "\\"SFMono-Regular\\", Consolas, \\"Liberation Mono\\", Menlo, Courier, monospace",
"FONT_STACK_DEFAULT": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_STACK_DEFAULT": "Inter var, Inter, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_WEIGHT_BOLD": 700,
"FONT_WEIGHT_DEFAULT": 400,
"FONT_WEIGHT_MEDIUM": 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`Footer should render 1`] = `
user-select: none;
overflow: hidden;
padding: 0 calc(var(--SPACING_BASE) * 0.5 * 1px);
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ exports[`Breadcrumbs matches snapshot 1`] = `
"FONT_SIZE_TEXT_XS": "10px",
"FONT_STACK_BRAND": "\\"Metropolis\\", \\"Helvetica Neue\\", Arial, sans-serif",
"FONT_STACK_CODE": "\\"SFMono-Regular\\", Consolas, \\"Liberation Mono\\", Menlo, Courier, monospace",
"FONT_STACK_DEFAULT": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_STACK_DEFAULT": "Inter var, Inter, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_WEIGHT_BOLD": 700,
"FONT_WEIGHT_DEFAULT": 400,
"FONT_WEIGHT_MEDIUM": 500,
Expand Down Expand Up @@ -166,7 +166,7 @@ exports[`Breadcrumbs matches snapshot 1`] = `
"FONT_SIZE_TEXT_XS": "10px",
"FONT_STACK_BRAND": "\\"Metropolis\\", \\"Helvetica Neue\\", Arial, sans-serif",
"FONT_STACK_CODE": "\\"SFMono-Regular\\", Consolas, \\"Liberation Mono\\", Menlo, Courier, monospace",
"FONT_STACK_DEFAULT": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_STACK_DEFAULT": "Inter var, Inter, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_WEIGHT_BOLD": 700,
"FONT_WEIGHT_DEFAULT": 400,
"FONT_WEIGHT_MEDIUM": 500,
Expand Down Expand Up @@ -239,7 +239,7 @@ exports[`Breadcrumbs matches snapshot 1`] = `
"FONT_SIZE_TEXT_XS": "10px",
"FONT_STACK_BRAND": "\\"Metropolis\\", \\"Helvetica Neue\\", Arial, sans-serif",
"FONT_STACK_CODE": "\\"SFMono-Regular\\", Consolas, \\"Liberation Mono\\", Menlo, Courier, monospace",
"FONT_STACK_DEFAULT": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_STACK_DEFAULT": "Inter var, Inter, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_WEIGHT_BOLD": 700,
"FONT_WEIGHT_DEFAULT": 400,
"FONT_WEIGHT_MEDIUM": 500,
Expand Down Expand Up @@ -312,7 +312,7 @@ exports[`Breadcrumbs matches snapshot 1`] = `
"FONT_SIZE_TEXT_XS": "10px",
"FONT_STACK_BRAND": "\\"Metropolis\\", \\"Helvetica Neue\\", Arial, sans-serif",
"FONT_STACK_CODE": "\\"SFMono-Regular\\", Consolas, \\"Liberation Mono\\", Menlo, Courier, monospace",
"FONT_STACK_DEFAULT": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_STACK_DEFAULT": "Inter var, Inter, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_WEIGHT_BOLD": 700,
"FONT_WEIGHT_DEFAULT": 400,
"FONT_WEIGHT_MEDIUM": 500,
Expand Down Expand Up @@ -385,7 +385,7 @@ exports[`Breadcrumbs matches snapshot 1`] = `
"FONT_SIZE_TEXT_XS": "10px",
"FONT_STACK_BRAND": "\\"Metropolis\\", \\"Helvetica Neue\\", Arial, sans-serif",
"FONT_STACK_CODE": "\\"SFMono-Regular\\", Consolas, \\"Liberation Mono\\", Menlo, Courier, monospace",
"FONT_STACK_DEFAULT": "-apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_STACK_DEFAULT": "Inter var, Inter, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", sans-serif",
"FONT_WEIGHT_BOLD": 700,
"FONT_WEIGHT_DEFAULT": 400,
"FONT_WEIGHT_MEDIUM": 500,
Expand Down
24 changes: 12 additions & 12 deletions src/components/Button/__snapshots__/Button.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports[`Button Snapshots matches orientation snapshots 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -147,7 +147,7 @@ exports[`Button Snapshots matches orientation snapshots 2`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -260,7 +260,7 @@ exports[`Button Snapshots matches outline snapshots 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -373,7 +373,7 @@ exports[`Button Snapshots matches size snapshots 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -486,7 +486,7 @@ exports[`Button Snapshots matches size snapshots 2`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -600,7 +600,7 @@ exports[`Button Snapshots matches size snapshots 3`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -714,7 +714,7 @@ exports[`Button Snapshots matches size snapshots 4`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -827,7 +827,7 @@ exports[`Button Snapshots matches size snapshots 5`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -940,7 +940,7 @@ exports[`Button Snapshots matches type snapshots 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -1053,7 +1053,7 @@ exports[`Button Snapshots matches type snapshots 2`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -1166,7 +1166,7 @@ exports[`Button Snapshots matches type snapshots 3`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down Expand Up @@ -1279,7 +1279,7 @@ exports[`Button Snapshots matches type snapshots 4`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`ButtonWrap should match snapshot 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-family: Inter var,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 400;
-webkit-box-pack: center;
-webkit-justify-content: center;
Expand Down
Loading

0 comments on commit a4eed1a

Please sign in to comment.