From 2e4cbd530e86f17cb20a5c1ca71a8025976022c7 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Sun, 15 Oct 2017 13:11:44 +0300 Subject: [PATCH] [www] Paginator updated --- src/components/Paginator.js | 13 ++++++++---- src/style/components/Paginator.scss | 10 +++++++++ .../components/article-page-control.scss | 21 ------------------- src/style/style.scss | 2 +- 4 files changed, 20 insertions(+), 26 deletions(-) create mode 100644 src/style/components/Paginator.scss delete mode 100644 src/style/components/article-page-control.scss diff --git a/src/components/Paginator.js b/src/components/Paginator.js index be6d438f..30f0de90 100644 --- a/src/components/Paginator.js +++ b/src/components/Paginator.js @@ -1,15 +1,20 @@ const React = require('react') -const text = ['↑ Предыдущая страница', '↓ Следующая страница'] -const style = ['article-page-control__top', 'article-page-control__bottom'] +const text = ['↑', '↓'] +const linkText = ['Предыдущая страница', 'Следующая страница'] const i = type => type === 'top' ? 0 : 1 +const Icon = ({children}) => ( + {children} +) + const Paginator = ({url, type}) => ( -
- {text[i(type)]} +
+ {text[i(type)]} + {linkText[i(type)]}
) diff --git a/src/style/components/Paginator.scss b/src/style/components/Paginator.scss new file mode 100644 index 00000000..c30feff5 --- /dev/null +++ b/src/style/components/Paginator.scss @@ -0,0 +1,10 @@ +.Paginator { + text-align: center; + font-size: var(--font-size-second); + + margin: var(--single-margin) 0; +} + +.Paginator-Icon { + margin: 0 10px; +} \ No newline at end of file diff --git a/src/style/components/article-page-control.scss b/src/style/components/article-page-control.scss deleted file mode 100644 index 58eddef7..00000000 --- a/src/style/components/article-page-control.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import "../variables"; - -.article-page-control{ - text-align: center; - - a{ - color: #aaa; - } - - &__top { - //padding: $single-margin 0 0; - //margin: $single-margin 0 0; - padding: 0 0 $single-margin; - margin: 0 0 $single-margin; - } - - &__bottom { - padding: 0 0 $single-margin; - margin: 0 0 $single-margin; - } -} diff --git a/src/style/style.scss b/src/style/style.scss index 72ffe66e..0e736258 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -14,7 +14,7 @@ @import "components/footer-links"; @import "components/cloud-page"; @import "components/article"; -@import "components/article-page-control"; +@import "components/Paginator"; @import "components/album"; @import "components/parallax"; @import "components/accessibility-control";