[www] Paginator updated

This commit is contained in:
Roman Timashev committed 2017-10-15 13:11:44 +03:00
1 parent c8868273d7
commit 2e4cbd530e
4 files changed
+20 -26

No files matched your search

+9 -4
View File
@@ -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}) => (
<span className="Paginator-Icon">{children}</span>
)
const Paginator = ({url, type}) => (
<div className={`article-page-control ${style[i(type)]}`}>
<a href={url}>{text[i(type)]}</a>
<div className="Paginator">
<Icon>{text[i(type)]}</Icon>
<a href={url}>{linkText[i(type)]}</a>
</div>
)