Skip to content

Commit

Permalink
Merge 7e1337c into 930f27a
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenM committed Dec 22, 2019
2 parents 930f27a + 7e1337c commit 42c6be7
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 137 deletions.
9 changes: 9 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ import { withKnobs } from '@storybook/addon-knobs/react';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { addDecorator, addParameters, configure } from '@storybook/react';
import { withHTML } from '@whitespace/storybook-addon-html/react';
/*
* app fonts
* jest requires 'index.css' for import to be mocked.
* see @ https://github.com/facebook/jest/issues/8988
*/
import 'typeface-montserrat/index.css';
import 'typeface-poppins/index.css';
import 'typeface-roboto/index.css';
// styles
import '../app/style/custom.scss';
import './storybook.css';

Expand Down
10 changes: 4 additions & 6 deletions .storybook/storybook.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ body {
}

body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body.fontLoaded {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

#app {
Expand All @@ -24,7 +22,7 @@ body.fontLoaded {

p,
label {
font-family: Georgia, Times, 'Times New Roman', serif;
font-family: 'Poppins', Georgia, Times, 'Times New Roman', serif;
line-height: 1.5em;
}

Expand Down
9 changes: 8 additions & 1 deletion app/components/atoms/Text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import PropTypes from 'prop-types';
import React from 'react';
import styled from 'styled-components';

export const TextColors = [
'primary',
Expand All @@ -26,9 +27,15 @@ export const TextColors = [

export const TextVariants = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', ''];

const StyledText = styled.p`
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
`;

const Text = ({ variant, color, className, children }) => {
const elClass = `${variant} text-${color} ${className}`;
return <p className={elClass}>{children}</p>;
return <StyledText className={elClass}>{children}</StyledText>;
};

Text.defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions app/components/atoms/Title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const Title = styled.h1.attrs(({ size, className }) => ({
}))`
color: ${props => props.color};
margin-bottom: 0.25em;
font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
`;

Title.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`<Hero /> Should render and match the snapshot 1`] = `
class="pb-3 my-auto col-6"
>
<h1
class="Title-sc-3abvrr-0 Hero__HeroTitle-sc-1ele3ck-1 bqYlOi mb-0 font-weight-bold display-1 mb-0 font-weight-bold"
class="Title-sc-3abvrr-0 Hero__HeroTitle-sc-1ele3ck-1 bVtUDZ mb-0 font-weight-bold display-1 mb-0 font-weight-bold"
color="#fefefe"
size="1"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`<HomeHero /> Should render and match the snapshot 1`] = `
class="pb-3 my-auto col-6"
>
<h1
class="Title-sc-3abvrr-0 Hero__HeroTitle-sc-1ele3ck-1 bqYlOi mb-0 font-weight-bold display-1 mb-0 font-weight-bold"
class="Title-sc-3abvrr-0 Hero__HeroTitle-sc-1ele3ck-1 bVtUDZ mb-0 font-weight-bold display-1 mb-0 font-weight-bold"
color="#fefefe"
size="1"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`<HomeLayout /> Should render and match the snapshot 1`] = `
class="banner-text text-center"
>
<p
class=" text-body m-0 p-1"
class="Text__StyledText-sc-1foatad-0 ckNvnb text-body m-0 p-1"
>
banner content
</p>
Expand Down Expand Up @@ -232,7 +232,7 @@ exports[`<HomeLayout /> Should render and match the snapshot 1`] = `
class="pb-3 my-auto col-6"
>
<h1
class="Title-sc-3abvrr-0 Hero__HeroTitle-sc-1ele3ck-1 bqYlOi mb-0 font-weight-bold display-1 mb-0 font-weight-bold"
class="Title-sc-3abvrr-0 Hero__HeroTitle-sc-1ele3ck-1 bVtUDZ mb-0 font-weight-bold display-1 mb-0 font-weight-bold"
color="#fefefe"
size="1"
>
Expand Down Expand Up @@ -279,12 +279,12 @@ exports[`<HomeLayout /> Should render and match the snapshot 1`] = `
class="p-3 col-md-7 col-9"
>
<p
class="h3 text-light text-justify text-center mb-3"
class="Text__StyledText-sc-1foatad-0 ckNvnb h3 text-light text-justify text-center mb-3"
>
Subscribe to our Newsletter
</p>
<p
class=" text-light text-center m-0"
class="Text__StyledText-sc-1foatad-0 ckNvnb text-light text-center m-0"
>
Don't miss out on any deals and stay up to date with the latest trends.
</p>
Expand Down
4 changes: 2 additions & 2 deletions app/global-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const GlobalStyle = createGlobalStyle`
}
body.fontLoaded {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: 'Montserrat', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
#app {
Expand All @@ -24,7 +24,7 @@ const GlobalStyle = createGlobalStyle`
p,
label {
font-family: Georgia, Times, 'Times New Roman', serif;
font-family: 'Poppins', Georgia, Times, 'Times New Roman', serif;
line-height: 1.5em;
}
Expand Down
Loading

0 comments on commit 42c6be7

Please sign in to comment.