Responder y crear formularios

This commit is contained in:
jalvarado
2025-04-01 17:01:58 -06:00
parent cbd2659f98
commit d2759c0afe
10 changed files with 999 additions and 25 deletions
+14 -18
View File
@@ -1,4 +1,4 @@
import React, { useMemo } from "react";
import React, { useMemo } from 'react';
interface PaginationProps {
totalPages: number;
@@ -43,15 +43,15 @@ export default function Pagination({
}, [currentPage, totalPages, delta]);
return (
<nav aria-label="Page navigation">
<ul className="pagination gap-1">
<nav aria-label='Page navigation'>
<ul className='pagination gap-1'>
{/* Botón Anterior */}
<li className={`page-item ${currentPage === 1 ? "disabled" : ""}`}>
<li className={`page-item ${currentPage === 1 ? 'disabled' : ''}`}>
<button
className="page-link shadow-sm rounded border-0 bg-white"
className='page-link box p-0'
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
aria-label="Previous"
aria-label='Previous'
>
&laquo;
</button>
@@ -60,21 +60,17 @@ export default function Pagination({
{/* Números de Página */}
{visiblePages.map((page, index) =>
page === -1 ? (
<li key={`ellipsis-${index}`} className="page-item disabled">
<span className="page-link shadow-sm rounded border-0 bg-white">
...
</span>
<li key={`ellipsis-${index}`} className='page-item disabled'>
<span className='page-link box p-0'>...</span>
</li>
) : (
<li
key={page}
className={`page-item ${currentPage === page ? "active" : ""}`}
className={`page-item ${currentPage === page ? 'active' : ''}`}
>
<button
className={`page-link shadow-sm rounded border-0 ${
currentPage === page
? ""
: "bg-white text-primary"
className={`page-link box p-0 ${
currentPage === page ? 'active' : ''
}`}
onClick={() => handlePageChange(page)}
>
@@ -87,14 +83,14 @@ export default function Pagination({
{/* Botón Siguiente */}
<li
className={`page-item ${
currentPage === totalPages ? "disabled" : ""
currentPage === totalPages ? 'disabled' : ''
}`}
>
<button
className="page-link shadow-sm rounded border-0 bg-white"
className='page-link box p-0'
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === totalPages}
aria-label="Next"
aria-label='Next'
>
&raquo;
</button>