UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

55 lines (48 loc) 1.98 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var tslib_es6 = require('../../../../../node_modules/tslib/tslib.es6.js'); var React = require('react'); var React__default = _interopDefault(React); var styled = require('styled-components'); var styled__default = _interopDefault(styled); /** * @file index.tsx * * @fileoverview Pager component. Renders a list of links as a pager. */ const StyledPager = styled__default.ul ` display: flex; list-style: none; padding-left: 0; margin: ${props => props.theme.pagination.list.margin}; li { margin-left: ${props => props.theme.pagination.list.separator}; a, button { color: ${props => props.theme.pagination.item.color}; background: ${props => props.theme.pagination.item.background}; padding: ${props => props.theme.pagination.item.padding}; border-width: ${props => props.theme.pagination.item.borderWidth}; border-style: ${props => props.theme.pagination.item.borderStyle}; border-color: ${props => props.theme.pagination.item.borderColor}; &:hover { background: ${props => props.theme.pagination.item.hover.background}; color: ${props => props.theme.pagination.item.hover.color}; } &.active { background: ${props => props.theme.pagination.item.active.background}; color: ${props => props.theme.pagination.item.active.color}; border-color: ${props => props.theme.pagination.item.active.borderColor}; } } } `; /** * Styles a list of items (anchors inside a list) with the theme provided by the theme object, in the form of a pager. */ const Pager = (_a) => { var { children } = _a, props = tslib_es6.__rest(_a, ["children"]); return React.createElement(StyledPager, Object.assign({}, props), children); }; exports.Pager = Pager;