Skip to content

Commit

Permalink
fix(pagination): add base text styles to pagination
Browse files Browse the repository at this point in the history
before it would look good only inside TableFooter because that component already sets text color

BREAKING CHANGE: Pagination now has its own text colors, instead of depending on parent styles or
own classes. It makes it useful outside elements like TableFooter, which would add text styles
before. The breaking change is that it doesn't inherit TableFooter (or any parent) colors anymore.
  • Loading branch information
estevanmaito committed Jul 13, 2020
1 parent 48c4348 commit 9258df1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion __tests__/Pagination.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ describe('Pagination', () => {

it('should render with base styles', () => {
const onChange = () => {}
const expected = 'flex flex-col justify-between text-xs sm:flex-row'
const expected =
'flex flex-col justify-between text-xs sm:flex-row text-gray-600 dark:text-gray-400'
const wrapper = mount(<Pagination totalResults={123} label="Navigation" onChange={onChange} />)

expect(wrapper.find(Pagination).getDOMNode().getAttribute('class')).toContain(expected)
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
// Pagination
pagination: {
base: 'flex flex-col justify-between text-xs sm:flex-row',
base: 'flex flex-col justify-between text-xs sm:flex-row text-gray-600 dark:text-gray-400',
},
// TableFooter
tableFooter: {
Expand Down

0 comments on commit 9258df1

Please sign in to comment.