import React, {FC} from 'react'; import {IPaginationButton} from '../../pagination.type'; import {PaginationStyle as S} from '../../pagination.style'; import ArrowLeft from 'herein-icon/arrow-left'; import ArrowRight from 'herein-icon/arrow-right'; export const PaginationButtonComponent: FC = ({ type, page, isSelected, nextButtonProps, previousButtonProps, countButtonProps, ...restProps }) => { const selected = isSelected ? 'active' : ''; if (type === 'next') return ( {nextButtonProps?.text || 'Next'} ); if (type === 'previous') return ( {previousButtonProps?.text || 'Previous'} ); if (type === 'start-ellipsis' || type === 'end-ellipsis') return ...; return ( {page} ); };