File tree Expand file tree Collapse file tree 4 files changed +21
-12
lines changed
Expand file tree Collapse file tree 4 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import styled from 'styled-components';
33import theme from '../styles/theme' ;
44import { QuoteProps } from './Typography.types' ;
55
6- const { fontWeights, fonts } = theme ;
6+ const { fontWeights, fonts, typography } = theme ;
77const QuoteText = styled . blockquote `
88 font-weight: ${ fontWeights . light } ;
99 line-height: 1.2em;
@@ -20,12 +20,16 @@ export const Small = styled.span`
2020 font-size: 0.66em;
2121` ;
2222
23- export const Subtitle = styled . h6 `
23+ export const Subtitle = styled . p `
2424 size: 0.85rem;
2525 height: 1.2em;
2626 font-family: ${ fonts . paragraph } ;
2727 font-weight: ${ fontWeights . bold } ;
2828 color: ${ theme . colors . primary } ;
29+ text-transform: uppercase;
30+ letter-spacing: ${ typography . subtitle . spacing } ;
31+ font-size: 0.85rem;
32+ margin-bottom: 0.5em;
2933` ;
3034
3135export const Quote : React . FC < QuoteProps > = ( { author, url, children } ) => {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import styled from 'styled-components' ;
33import theme from '../../styles/theme' ;
44import Button from '../../components/Button/Button' ;
5+ import { Subtitle } from '../../components/Typography' ;
56
67const { mediaQueryMin } = theme ;
78export const CreditsContainer = styled . div `
@@ -51,7 +52,7 @@ interface CreditItemProps {
5152}
5253export const CreditItem : React . FC < CreditItemProps > = ( { title, credits } ) => (
5354 < CreditItemContainer >
54- < CreditTitle className = "subtitle" > { title } </ CreditTitle >
55+ < Subtitle > { title } </ Subtitle >
5556 { credits . map ( ( credit ) => (
5657 < CreditText className = "Paragraph light" > { credit } </ CreditText >
5758 ) ) }
@@ -70,7 +71,7 @@ export const CreditItemWithLinks: React.FC<CreditItemWithLinksProps> = ({
7071 links,
7172} : CreditItemWithLinksProps ) => (
7273 < CreditItemContainer >
73- < CreditTitle className = "subtitle" > { title } </ CreditTitle >
74+ < Subtitle > { title } </ Subtitle >
7475 { credits . map ( ( credit , index ) => (
7576 < >
7677 < CreditText > { credit } </ CreditText >
Original file line number Diff line number Diff line change 11import styled from 'styled-components' ;
22import theme from '../styles/theme' ;
3- import { Big , Small } from '../components/Typography' ;
3+ import { Big , Small , Subtitle } from '../components/Typography' ;
44
55const { mediaQueryMin, colors } = theme ;
66
@@ -117,15 +117,12 @@ export const SubtitleContainer = styled.div`
117117 text-transform: uppercase;
118118 align-items: flex-end;
119119 padding: 0 1em;
120- span,
121- p {
122- opacity: 0.3;
123- color: ${ colors . lightgray } ;
124- }
125120` ;
126121
127122export const ReadingTime = styled ( Small ) `
128123 margin-bottom: 2px;
124+ opacity: 0.3;
125+ color: ${ colors . lightgray } ;
129126` ;
130127
131128export const ArticleImage = styled . img `
@@ -143,3 +140,9 @@ export const CallToActionText = styled.p`
143140 font-style: italic;
144141 color: ${ theme . colors . lightgray } !important;
145142` ;
143+
144+ export const StyledSubtitle = styled ( Subtitle ) `
145+ margin-top: 0.66em;
146+ margin-bottom: 0.33em;
147+ font-weight: ${ theme . fontWeights . regular } ;
148+ ` ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import MDXRenderer from 'gatsby-mdx/mdx-renderer' ; // TODO: fix mdx to work with Typescript
2+ import MDXRenderer from 'gatsby-mdx/mdx-renderer' ;
33import { BlogpostSingleProps , CallToActionProps } from './BlogpostLayout.types' ;
44import Layout from './MainLayout' ;
55import Author from '../containers/Author/Author' ;
@@ -19,6 +19,7 @@ import {
1919 ArticleIntro ,
2020 CallToActionContainer ,
2121 CallToActionText ,
22+ StyledSubtitle ,
2223} from './BlogpostLayout.components' ;
2324
2425const CallToAction : React . FC < CallToActionProps > = ( ) => (
@@ -44,7 +45,7 @@ const BlogSingle: React.FC<BlogpostSingleProps> = ({ content }) => (
4445 < Article >
4546 < ArticleHeader >
4647 < SubtitleContainer >
47- < Subtitle > { content . category_name } </ Subtitle >
48+ < StyledSubtitle > { content . category_name } </ StyledSubtitle >
4849 < ReadingTime >
4950 // { content . reading_time } min. read
5051 </ ReadingTime >
You can’t perform that action at this time.
0 commit comments