diff --git a/src/components/Article/index.mdx b/src/components/Article/index.mdx index cc2b4c5e..592ee7fc 100644 --- a/src/components/Article/index.mdx +++ b/src/components/Article/index.mdx @@ -5,6 +5,7 @@ route: /article import { Playground, PropsTable } from 'docz' import Article from '.' +import { css } from 'react-emotion' # Article @@ -16,6 +17,7 @@ Note that `Article` expects an array of `Content`, which
{ } ` : ''}; + ${this.props.style}; `} > {renderedContent} diff --git a/src/components/ArticleGrid/index.mdx b/src/components/ArticleGrid/index.mdx index 227d30f6..88c76a73 100644 --- a/src/components/ArticleGrid/index.mdx +++ b/src/components/ArticleGrid/index.mdx @@ -5,6 +5,7 @@ route: /article-grid import { Playground, PropsTable } from 'docz' import ArticleGrid from '.' +import { css } from 'react-emotion' # ArticleGrid @@ -13,5 +14,8 @@ A grid of articles for displaying on grid layout flatpages. - + diff --git a/src/components/ArticleGrid/index.tsx b/src/components/ArticleGrid/index.tsx index ee3c05d6..c1a9116e 100644 --- a/src/components/ArticleGrid/index.tsx +++ b/src/components/ArticleGrid/index.tsx @@ -11,6 +11,7 @@ interface ArticleGridProps { articles: ArticleCardData[] maxColumns: number minColumns: number + style?: string } export default class ArticleGrid extends React.Component { @@ -47,6 +48,7 @@ export default class ArticleGrid extends React.Component { id={!!this.props.heading ? slugify(this.props.heading) : undefined} className={css` margin-top: 20px; + ${this.props.style}; `} > {!!this.props.heading && ( diff --git a/src/components/Byline/index.mdx b/src/components/Byline/index.mdx index 128bf79c..89a72fc9 100644 --- a/src/components/Byline/index.mdx +++ b/src/components/Byline/index.mdx @@ -5,6 +5,7 @@ route: /byline import { Playground, PropsTable } from 'docz' import Byline from '.' +import { css } from 'react-emotion' # Byline @@ -13,6 +14,9 @@ Every story needs an author and a byline. - + diff --git a/src/components/Byline/index.tsx b/src/components/Byline/index.tsx index 157aed19..d3be0afe 100644 --- a/src/components/Byline/index.tsx +++ b/src/components/Byline/index.tsx @@ -8,6 +8,8 @@ import toSentence from '../../utils/toSentence' interface BylineProps { /** The authors of the story. */ authors: string | string[] + /** Custom css for the byline */ + style?: string } /** The byline of the story. */ @@ -21,6 +23,7 @@ export default function Byline(props: BylineProps) {
By {authorString} diff --git a/src/components/CoverPhoto/index.mdx b/src/components/CoverPhoto/index.mdx index 92bd43d8..2c09b8da 100644 --- a/src/components/CoverPhoto/index.mdx +++ b/src/components/CoverPhoto/index.mdx @@ -5,6 +5,7 @@ route: /cover-photo import { Playground, PropsTable } from 'docz' import CoverPhoto from '.' +import { css } from 'react-emotion' # Cover Photo @@ -13,7 +14,7 @@ A cover photo. - diff --git a/src/components/CoverPhoto/index.tsx b/src/components/CoverPhoto/index.tsx index e75229ec..0530895a 100644 --- a/src/components/CoverPhoto/index.tsx +++ b/src/components/CoverPhoto/index.tsx @@ -22,6 +22,7 @@ interface CoverPhotoProps { xPosition: XPosition yPosition: YPosition darken?: number + style?: string } export default class CoverPhoto extends React.Component { @@ -52,6 +53,7 @@ export default class CoverPhoto extends React.Component { display: grid; align-items: ${this.props.yPosition}; justify-content: ${this.props.xPosition}; + ${this.props.style} `} >