Fixes pagination subtext color in dark mode (#1980)

This commit is contained in:
Arpit 2022-01-28 07:36:38 +05:30 committed by GitHub
parent 2b81ca56a7
commit 01efd39d88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -590,6 +590,7 @@ class HomePage extends React.Component {
currentPage={meta.current_page}
count={this.pageCount()}
pageChanged={this.pageChanged}
darkMode={this.props.darkMode}
/>
)}
</div>

View file

@ -1,6 +1,6 @@
import React, { useMemo } from 'react';
export const Pagination = function Pagination({ currentPage, count, pageChanged, itemsPerPage = 10 }) {
export const Pagination = function Pagination({ currentPage, count, pageChanged, itemsPerPage = 10, darkMode }) {
const totalPages = useMemo(() => {
return Math.floor((count - 1) / itemsPerPage) + 1;
}, [count, itemsPerPage]);
@ -53,7 +53,7 @@ export const Pagination = function Pagination({ currentPage, count, pageChanged,
return (
<div className="card-footer d-flex align-items-center px-1">
<p className="m-0 text-muted">
<p className={`m-0 ${darkMode ? 'text-white-50' : 'text-muted'}`}>
Showing <span>{startingAppCount()}</span> to <span>{endingAppCount()}</span> of <span>{count}</span>
</p>
<ul className="pagination m-0 ms-auto">