diff --git a/src/components/Article.js b/src/components/Article/index.tsx similarity index 71% rename from src/components/Article.js rename to src/components/Article/index.tsx index 7e71c0bb..0be499cc 100644 --- a/src/components/Article.js +++ b/src/components/Article/index.tsx @@ -1,6 +1,5 @@ -import React from 'react' -import { dateFormat } from '../lib/date' -import { Share } from './Share' +import { dateFormat } from 'src/lib/date' +import { Share } from '../Share' const Tag = ({ children }) => (
  • @@ -18,10 +17,16 @@ const TagList = ({ tags }) => ( const Head = ({ date, tags = [], children }) => (
    + +

    {children}

    {!date ? null : ( -

    {dateFormat(date)}

    +

    {dateFormat(date)}

    )} {!(tags.length) ? null : ( @@ -30,7 +35,7 @@ const Head = ({ date, tags = [], children }) => (
    ) -const Article = ({ children, date, tags, title, shareable }) => ( +export const Article = ({ children, date, tags, title, shareable }) => (
    ( )}
    ) - -export default Article diff --git a/src/style/components/Article.scss b/src/style/components/Article.scss index 12fa83c1..f172e585 100644 --- a/src/style/components/Article.scss +++ b/src/style/components/Article.scss @@ -15,13 +15,7 @@ margin-bottom: var(--article-head-margin-bottom); } - .date { - text-align: center; - color: #aaa; - - margin-bottom: 1.25em; - } - } + } &-Body { --text-margin: 10px;