File tree 3 files changed +8
-35
lines changed
3 files changed +8
-35
lines changed Original file line number Diff line number Diff line change 1
- import { useTheme } from "@emotion/react" ;
2
1
import { Button } from "components/Button/Button" ;
3
2
import type { FC , ReactNode } from "react" ;
4
- import { cn } from "utils/cn" ;
5
3
6
4
type NumberedPageButtonProps = {
7
5
pageNumber : number ;
8
6
totalPages : number ;
9
-
10
7
onClick ?: ( ) => void ;
11
8
highlighted ?: boolean ;
12
9
disabled ?: boolean ;
@@ -69,27 +66,10 @@ const BasePageButton: FC<BasePageButtonProps> = ({
69
66
highlighted = false ,
70
67
disabled = false ,
71
68
} ) => {
72
- const theme = useTheme ( ) ;
73
-
74
69
return (
75
70
< Button
76
- variant = "outline"
77
- size = "sm"
78
- style = {
79
- highlighted ? {
80
- borderColor : theme . roles . active . outline ,
81
- backgroundColor : theme . roles . active . background ,
82
- // Define CSS variables to use in hover styles
83
- "--active-border-color" : theme . roles . active . outline ,
84
- "--active-bg-color" : theme . roles . active . background ,
85
- } : undefined
86
- }
87
- className = {
88
- highlighted ? cn (
89
- // Override default hover styles for highlighted buttons
90
- "hover:!border-[color:var(--active-border-color)] hover:!bg-[color:var(--active-bg-color)]"
91
- ) : undefined
92
- }
71
+ variant = { highlighted ? "default" : "outline" }
72
+ size = "icon"
93
73
aria-label = { ariaLabel }
94
74
name = { name }
95
75
disabled = { disabled }
@@ -118,4 +98,4 @@ function getNumberedButtonLabel(
118
98
}
119
99
120
100
return `Page ${ page } ` ;
121
- }
101
+ }
Original file line number Diff line number Diff line change @@ -62,16 +62,9 @@ function PaginationNavButtonCore({
62
62
*/ }
63
63
< Button
64
64
variant = "outline"
65
- size = "sm"
66
- aria-disabled = { disabled }
67
- className = { disabled ? "cursor-default" : undefined }
68
- onClick = { ( ) => {
69
- if ( disabled ) {
70
- setShowDisabledMessage ( true ) ;
71
- } else {
72
- onClick ( ) ;
73
- }
74
- } }
65
+ size = "icon"
66
+ disabled = { disabled }
67
+ onClick = { onClick }
75
68
{ ...delegatedProps }
76
69
/>
77
70
</ Tooltip >
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export const PaginationWidgetBase: FC<PaginationWidgetBaseProps> = ({
59
59
}
60
60
} }
61
61
>
62
- < ChevronLeftIcon className = "size-icon-sm" />
62
+ < ChevronLeftIcon />
63
63
</ PaginationNavButton >
64
64
65
65
{ isMobile ? (
@@ -86,7 +86,7 @@ export const PaginationWidgetBase: FC<PaginationWidgetBaseProps> = ({
86
86
}
87
87
} }
88
88
>
89
- < ChevronRightIcon className = "size-icon-sm" />
89
+ < ChevronRightIcon />
90
90
</ PaginationNavButton >
91
91
</ div >
92
92
) ;
You can’t perform that action at this time.
0 commit comments