@vertisanpro/flowbite-react
Version:
Non-Official React components built for Flowbite and Tailwind CSS
15 lines (14 loc) • 1.04 kB
JavaScript
import { twMerge } from '@vertisanpro/tailwind-merge';
import React from 'react';
import { mergeDeep } from '../../helpers/merge-deep';
import { getTheme } from '../../theme-store';
export const PaginationButton = ({ active, children, className, onClick, theme: customTheme = {}, ...props }) => {
const theme = mergeDeep(getTheme().pagination, customTheme);
return (React.createElement("button", { type: "button", className: twMerge(active && theme.pages.selector.active, className), onClick: onClick, ...props }, children));
};
PaginationButton.displayName = 'Pagination.Button';
export const PaginationNavigation = ({ children, className, onClick, theme: customTheme = {}, disabled = false, ...props }) => {
const theme = mergeDeep(getTheme().pagination, customTheme);
return (React.createElement("button", { type: "button", className: twMerge(disabled && theme.pages.selector.disabled, className), disabled: disabled, onClick: onClick, ...props }, children));
};
PaginationNavigation.displayName = 'Pagination.Navigation';