diff --git a/.changeset/sixty-onions-share.md b/.changeset/sixty-onions-share.md new file mode 100644 index 00000000000..10c54dc457a --- /dev/null +++ b/.changeset/sixty-onions-share.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +fix: hover background in ActionList.Item diff --git a/packages/react/src/ActionList/Item.tsx b/packages/react/src/ActionList/Item.tsx index 5db1765bfb5..268c7a4312f 100644 --- a/packages/react/src/ActionList/Item.tsx +++ b/packages/react/src/ActionList/Item.tsx @@ -147,7 +147,7 @@ export const Item = React.forwardRef( const hoverStyles = { '@media (hover: hover) and (pointer: fine)': { - ':hover:not([aria-disabled]):not([data-inactive])': { + '&:hover:not([aria-disabled]):not([data-inactive])': { backgroundColor: `actionListItem.${variant}.hoverBg`, color: getVariantStyles(variant, disabled, inactive).hoverColor, boxShadow: `inset 0 0 0 max(1px, 0.0625rem) ${theme?.colors.actionListItem.default.activeBorder}`, @@ -157,7 +157,7 @@ export const Item = React.forwardRef( border: `2 solid`, boxShadow: `0 0 0 2px ${theme?.colors.accent.emphasis}`, }, - ':active:not([aria-disabled]):not([data-inactive])': { + '&:active:not([aria-disabled]):not([data-inactive])': { backgroundColor: `actionListItem.${variant}.activeBg`, color: getVariantStyles(variant, disabled, inactive).hoverColor, },