File tree 3 files changed +18
-0
lines changed
3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,16 @@ describe('DatabasePagination', () => {
118
118
expect ( controller . find ( '.all-db-footer__total-db-count' ) . text ( ) ) . toBe ( '30' ) ;
119
119
} ) ;
120
120
121
+ it ( 'renders custom content when supplied' , ( ) => {
122
+ const withCustomFooter = (
123
+ < Views . DatabasePagination linkPath = "_custom_path" >
124
+ < span className = "custom" > custom content</ span >
125
+ </ Views . DatabasePagination >
126
+ ) ;
127
+ const el = mount ( withCustomFooter ) ;
128
+ expect ( el . find ( 'span.custom' ) . exists ( ) ) . toBe ( true ) ;
129
+ } ) ;
130
+
121
131
} ) ;
122
132
123
133
describe ( 'DatabaseTable' , ( ) => {
Original file line number Diff line number Diff line change @@ -531,6 +531,7 @@ class DatabasePagination extends React.Component {
531
531
const { limit, page, totalAmountOfDatabases } = this . state ;
532
532
const start = 1 + ( page - 1 ) * limit ;
533
533
const end = Math . min ( totalAmountOfDatabases , page * limit ) ;
534
+ const { children } = this . props ;
534
535
535
536
return (
536
537
< footer className = "all-db-footer pagination-footer" >
@@ -548,6 +549,9 @@ class DatabasePagination extends React.Component {
548
549
of < span className = "all-db-footer__total-db-count" > { totalAmountOfDatabases } </ span >
549
550
databases.
550
551
</ div >
552
+ < div className = "custom-db-footer-item" >
553
+ { children }
554
+ </ div >
551
555
</ footer >
552
556
) ;
553
557
}
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ footer.pagination-footer {
44
44
margin : 15px 20px 17px 20px ;
45
45
}
46
46
47
+ .custom-db-footer-item {
48
+ float : right ;
49
+ }
50
+
47
51
.documents-pagination {
48
52
float : right ;
49
53
}
You can’t perform that action at this time.
0 commit comments