From e7f3b0d7cea82e62ba3002bfa205beec1766fd75 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Fri, 21 Feb 2020 04:10:14 +0300 Subject: [PATCH] move to ts --- .../{Article.js => Article/index.tsx} | 17 ++++++++++------- src/style/components/Article.scss | 8 +------- 2 files changed, 11 insertions(+), 14 deletions(-) rename src/components/{Article.js => Article/index.tsx} (71%) 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;