Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ const Pagination: React.FC<PaginationProps> = (props) => {
simplePager = (
<li
title={showTitle ? `${current}/${allPages}` : null}
className={`${prefixCls}-simple-pager`}
className={clsx(
`${prefixCls}-simple-pager`,
paginationClassNames?.item,
)}
style={styles?.item}
>
{isReadOnly ? (
internalInputVal
Expand Down
18 changes: 18 additions & 0 deletions tests/simple.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,22 @@ describe('simple Pagination', () => {
const { container } = render(<Pagination simple={{ readOnly: true }} />);
expect(container).toMatchSnapshot();
});

it('should apply semantic item styles to simplePager', () => {
const customClassName = 'custom-item-class';
const customStyle = { backgroundColor: 'red' };

const { container } = render(
<Pagination
simple
total={25}
classNames={{ item: customClassName }}
styles={{ item: customStyle }}
/>,
);

const simplePager = container.querySelector('.rc-pagination-simple-pager');
expect(simplePager).toHaveClass(customClassName);
expect(simplePager).toHaveStyle('background-color: red');
});
});