seti-ramesesv1
Version:
Reusable components and context for Next.js apps
13 lines (10 loc) • 1.31 kB
JavaScript
import { jsxs, jsx } from 'react/jsx-runtime';
import 'react';
import ChevronsLeft from '../../../node_modules/lucide-react/dist/esm/icons/chevrons-left.js';
import ChevronLeft from '../../../node_modules/lucide-react/dist/esm/icons/chevron-left.js';
import ChevronRight from '../../../node_modules/lucide-react/dist/esm/icons/chevron-right.js';
const DataListFooter = ({ start, limit, hasNext, onChangeStart }) => {
return (jsxs("div", { className: "flex justify-end gap-2 p-2 bg-gray-50", children: [jsx("button", { type: "button", className: "p-1 rounded hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed", onClick: () => onChangeStart(0), disabled: start === 0, children: jsx(ChevronsLeft, { size: 16 }) }), jsx("button", { type: "button", className: "p-1 rounded hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed", onClick: () => onChangeStart(Math.max(0, start - limit)), disabled: start === 0, children: jsx(ChevronLeft, { size: 16 }) }), jsx("button", { type: "button", className: "p-1 rounded hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed", onClick: () => onChangeStart(start + limit), disabled: !hasNext, children: jsx(ChevronRight, { size: 16 }) })] }));
};
export { DataListFooter as default };
//# sourceMappingURL=DataListFooter.js.map