Skip to content

Commit

Permalink
fix(SegmentedControl): set global focus styles (#5029)
Browse files Browse the repository at this point in the history
* fix(SegmentedControl): set global focus styles

* Create itchy-paws-bake.md
  • Loading branch information
francinelucca authored Oct 9, 2024
1 parent 00ff2f8 commit 0d444d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-paws-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

fix(SegmentedControl): set global focus styles
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {SxProp} from '../sx'
import sx, {merge} from '../sx'
import {getSegmentedControlButtonStyles, getSegmentedControlListItemStyles} from './getSegmentedControlStyles'
import {defaultSxProp} from '../utils/defaultSxProp'
import getGlobalFocusStyles from '../internal/utils/getGlobalFocusStyles'

export type SegmentedControlButtonProps = {
/** The visible label rendered in the button */
Expand All @@ -21,6 +22,7 @@ export type SegmentedControlButtonProps = {
ButtonHTMLAttributes<HTMLButtonElement | HTMLLIElement>

const SegmentedControlButtonStyled = styled.button`
${getGlobalFocusStyles()};
${sx};
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import sx, {merge} from '../sx'
import {getSegmentedControlButtonStyles, getSegmentedControlListItemStyles} from './getSegmentedControlStyles'
import Box from '../Box'
import {defaultSxProp} from '../utils/defaultSxProp'
import getGlobalFocusStyles from '../internal/utils/getGlobalFocusStyles'

export type SegmentedControlIconButtonProps = {
'aria-label': string
Expand All @@ -20,6 +21,7 @@ export type SegmentedControlIconButtonProps = {
ButtonHTMLAttributes<HTMLButtonElement | HTMLLIElement>

const SegmentedControlIconButtonStyled = styled.button`
${getGlobalFocusStyles()};
${sx};
`

Expand Down

0 comments on commit 0d444d7

Please sign in to comment.