如何为语义UI反应分页组件的活动项目设置样式

时间:2019-06-09 14:08:41

标签: pagination semantic-ui-react

我在我的项目中使用语义UI响应包,并且在代码中使用了分页。 我想主动设计由语义UI反应提供的分页组件的活动项目。有人可以建议如何做吗? 下面是我的分页组件代码。

import React from 'react';
import { Pagination } from 'semantic-ui-react';
import PropTypes from 'prop-types';
import ceil from 'lodash/ceil';

const ShowPagination = ({ onPageChangeHandler, activePage, total, itemsPerPage }) => {
  if (itemsPerPage === 0) return;
  return (
    <Pagination
      secondary
      activePage={activePage}
      onPageChange={onPageChangeHandler}
      totalPages={ceil(total / itemsPerPage)}
    />
  );
};

ShowPagination.propTypes = {
  onPageChangeHandler: PropTypes.func,
  activePage: PropTypes.number,
  total: PropTypes.number,
  itemsPerPage: PropTypes.number,
};
export default ShowPagination;

0 个答案:

没有答案
相关问题