File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,11 @@ const Pagination: React.FC<PaginationProps> = (props) => {
381381 simplePager = (
382382 < li
383383 title = { showTitle ? `${ current } /${ allPages } ` : null }
384- className = { `${ prefixCls } -simple-pager` }
384+ className = { clsx (
385+ `${ prefixCls } -simple-pager` ,
386+ paginationClassNames ?. item ,
387+ ) }
388+ style = { styles ?. item }
385389 >
386390 { isReadOnly ? (
387391 internalInputVal
Original file line number Diff line number Diff line change @@ -305,4 +305,22 @@ describe('simple Pagination', () => {
305305 const { container } = render ( < Pagination simple = { { readOnly : true } } /> ) ;
306306 expect ( container ) . toMatchSnapshot ( ) ;
307307 } ) ;
308+
309+ it ( 'should apply semantic item styles to simplePager' , ( ) => {
310+ const customClassName = 'custom-item-class' ;
311+ const customStyle = { backgroundColor : 'red' } ;
312+
313+ const { container } = render (
314+ < Pagination
315+ simple
316+ total = { 25 }
317+ classNames = { { item : customClassName } }
318+ styles = { { item : customStyle } }
319+ /> ,
320+ ) ;
321+
322+ const simplePager = container . querySelector ( '.rc-pagination-simple-pager' ) ;
323+ expect ( simplePager ) . toHaveClass ( customClassName ) ;
324+ expect ( simplePager ) . toHaveStyle ( { 'background-color' : 'red' } ) ;
325+ } ) ;
308326} ) ;
You can’t perform that action at this time.
0 commit comments