Skip to content

Commit 269e9d9

Browse files
authored
Merge pull request #384
refactor(19388): Fix the icons of the table pagination toolbar * refactor(19388): fix the override bug and change the icons of the pag…
1 parent 1c875af commit 269e9d9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

hivemq-edge/src/frontend/src/components/PaginatedTable/components/PaginationBar.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { FC } from 'react'
22
import { Table } from '@tanstack/react-table'
3+
import { useTranslation } from 'react-i18next'
34
import {
45
Box,
56
ButtonGroup,
@@ -14,11 +15,10 @@ import {
1415
NumberInputStepper,
1516
Select,
1617
Text,
18+
type IconButtonProps,
1719
} from '@chakra-ui/react'
18-
import { type IconButtonProps } from '@chakra-ui/react'
19-
import { MdArrowLeft, MdArrowRight } from 'react-icons/md'
20-
import { BiSkipNext, BiSkipPrevious } from 'react-icons/bi'
21-
import { useTranslation } from 'react-i18next'
20+
import { LuSkipBack, LuSkipForward, LuStepBack, LuStepForward } from 'react-icons/lu'
21+
2222
import IconButton from '@/components/Chakra/IconButton.tsx'
2323

2424
interface PaginationProps<T> {
@@ -27,7 +27,7 @@ interface PaginationProps<T> {
2727
}
2828

2929
const PaginationButton: FC<IconButtonProps> = (props) => (
30-
<IconButton {...props} size="sm" fontSize="24px" icon={<BiSkipNext />} />
30+
<IconButton icon={<LuSkipBack />} {...props} size="sm" fontSize="18px" />
3131
)
3232

3333
const PaginationBar = <T,>({ table, pageSizes }: PaginationProps<T>) => {
@@ -36,25 +36,25 @@ const PaginationBar = <T,>({ table, pageSizes }: PaginationProps<T>) => {
3636
<HStack as="nav" aria-label={t('components:pagination.ariaLabel') as string} gap={8} mt={4}>
3737
<ButtonGroup isAttached variant="ghost">
3838
<PaginationButton
39-
icon={<BiSkipPrevious />}
39+
icon={<LuSkipBack />}
4040
onClick={() => table.setPageIndex(0)}
4141
aria-label={t('components:pagination.goFirstPage')}
4242
isDisabled={!table.getCanPreviousPage()}
4343
/>
4444
<PaginationButton
45-
icon={<MdArrowLeft />}
45+
icon={<LuStepBack />}
4646
onClick={() => table.previousPage()}
4747
aria-label={t('components:pagination.goPreviousPage')}
4848
isDisabled={!table.getCanPreviousPage()}
4949
/>
5050
<PaginationButton
51-
icon={<MdArrowRight />}
51+
icon={<LuStepForward />}
5252
onClick={() => table.nextPage()}
5353
aria-label={t('components:pagination.goNextPage')}
5454
isDisabled={!table.getCanNextPage()}
5555
/>
5656
<PaginationButton
57-
icon={<BiSkipNext />}
57+
icon={<LuSkipForward />}
5858
onClick={() => table.setPageIndex(table.getPageCount() - 1)}
5959
aria-label={t('components:pagination.goLastPage')}
6060
isDisabled={!table.getCanNextPage()}

0 commit comments

Comments
 (0)