File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @primer/react " : patch
3+ ---
4+
5+ Add focus styles to Pagination component
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import Box from '../Box'
44import { get } from '../constants'
55import type { SxProp } from '../sx'
66import sx from '../sx'
7- import getGlobalFocusStyles from '../internal/utils/getGlobalFocusStyles'
87import { buildComponentData , buildPaginationModel } from './model'
98import type { ResponsiveValue } from '../hooks/useResponsiveValue'
109import { viewportRanges } from '../hooks/useResponsiveValue'
@@ -56,7 +55,10 @@ const Page = styled.a`
5655 transition-duration: 0.1s;
5756 }
5857
59- ${ getGlobalFocusStyles ( 0 ) } ;
58+ &:focus-visible {
59+ outline: 2px solid ${ get ( 'colors.accent.emphasis' ) } ;
60+ outline-offset: -2px;
61+ }
6062
6163 &:active {
6264 border-color: ${ get ( 'colors.border.muted' ) } ;
@@ -74,6 +76,12 @@ const Page = styled.a`
7476 border-color: transparent;
7577 }
7678
79+ &[aria-current]:focus-visible {
80+ outline: 2px solid ${ get ( 'colors.accent.emphasis' ) } ;
81+ outline-offset: -2px;
82+ box-shadow: inset 0 0 0 3px ${ get ( 'colors.fg.onEmphasis' ) } ;
83+ }
84+
7785 &[aria-disabled],
7886 &[aria-disabled]:hover {
7987 margin: 0 2px;
@@ -196,7 +204,7 @@ const PaginationContainer = styled.nav<SxProp>`
196204 .TablePaginationSteps[data-hidden-viewport-ranges*='${ viewportRangeKey } '] > *:first-child {
197205 margin-inline-end: 0;
198206 }
199-
207+
200208 .TablePaginationSteps[data-hidden-viewport-ranges*='${ viewportRangeKey } '] > *:last-child {
201209 margin-inline-start: 0;
202210 }
You can’t perform that action at this time.
0 commit comments