Merge pull request '"Pagination overlaps on '+' (Add) button in Directory – bottom right corner"' (#218) from Kartik_Bug#611 into Issues_Jun_3W

Reviewed-on: #218
This commit is contained in:
Vikas Nale 2025-06-30 06:43:00 +00:00
commit d86c8a2c0b

View File

@ -129,25 +129,29 @@ const NotesCardViewDirectory = ({ notes, setNotesForFilter, searchText, filterAp
{/* Pagination */}
{totalPages > 1 && (
<div className="d-flex justify-content-end mt-3 me-3">
<div className="d-flex align-items-center gap-2">
<div className="d-flex justify-content-end mt-2 align-items-center gap-2"
style={{ marginBottom: '70px' }}>
{/* Previous Button */}
<button
className="btn btn-sm rounded-circle border"
className="btn btn-sm rounded-circle border text-secondary" // Added text-secondary for lighter color, kept btn-sm for smaller size like in image
onClick={() => handlePageClick(Math.max(1, currentPage - 1))}
disabled={currentPage === 1}
title="Previous"
style={{ width: "38px", height: "38px", padding: 0 }} // Ensure consistent size
>
«
</button>
{/* Page Number Buttons */}
{[...Array(totalPages)].map((_, i) => {
const page = i + 1;
return (
<button
key={page}
className={`btn btn-sm rounded-circle border ${page === currentPage ? "btn-primary text-white" : "btn-outline-primary"
// Changed btn-sm to just btn, adjusted class for active/inactive state backgrounds and text colors
className={`btn rounded-circle border ${page === currentPage ? "btn-primary text-white" : "btn-light text-secondary"
}`}
style={{ width: "32px", height: "32px", padding: 0 }}
style={{ width: "38px", height: "38px", padding: 0, fontSize: "1rem", lineHeight: "1" }} // Adjusted size and font for better fit
onClick={() => handlePageClick(page)}
>
{page}
@ -155,16 +159,17 @@ const NotesCardViewDirectory = ({ notes, setNotesForFilter, searchText, filterAp
);
})}
{/* Next Button */}
<button
className="btn btn-sm rounded-circle border"
className="btn btn-sm rounded-circle border text-secondary" // Added text-secondary for lighter color, kept btn-sm
onClick={() => handlePageClick(Math.min(totalPages, currentPage + 1))}
disabled={currentPage === totalPages}
title="Next"
style={{ width: "38px", height: "38px", padding: 0 }} // Ensure consistent size
>
»
</button>
</div>
</div>
)}
</div>
);