Skip to content

Commit

Permalink
Merge branch 'main' into markdown-suggestions-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp authored Oct 12, 2022
2 parents 42b583d + 294b4c4 commit d832344
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-pumas-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Fix invalid hover outline variant of the Button component
8 changes: 8 additions & 0 deletions src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ export const invisibleButton = (args: ButtonProps) => {
)
}

export const outlineButton = (args: ButtonProps) => {
return (
<Button {...args} variant="outline">
Outline
</Button>
)
}

export const iconBeforeButton = (args: ButtonProps) => {
return (
<Button leadingIcon={SearchIcon} {...args}>
Expand Down
2 changes: 1 addition & 1 deletion src/Button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme
'&:hover:not([disabled])': {
color: 'btn.outline.hoverText',
backgroundColor: 'btn.outline.hoverBg',
borderColor: 'outline.hoverBorder',
borderColor: 'btn.outline.hoverBorder',
boxShadow: `${theme?.shadows.btn.outline.hoverShadow}`,
'[data-component=ButtonCounter]': {
backgroundColor: 'btn.outline.hoverCounterBg',
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/__snapshots__/Button.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ exports[`Button styles outline button appropriately 1`] = `
.c0:hover:not([disabled]) {
color: btn.outline.hoverText;
background-color: btn.outline.hoverBg;
border-color: outline.hoverBorder;
border-color: btn.outline.hoverBorder;
box-shadow: undefined;
}
Expand Down

0 comments on commit d832344

Please sign in to comment.