Skip to content

Commit

Permalink
fix(button): Typo outline button variant (#2393)
Browse files Browse the repository at this point in the history
* fix: typo outline button hover style

* chore: update storybook of Button to support outline variant

* chore: add changeset

* test(button): update test snapshot

* chore(button): consistent storybook name

Co-authored-by: Josh Black <joshblack@github.com>
  • Loading branch information
Ou/Olly Kunanan Tassuwan and joshblack authored Oct 11, 2022
1 parent e395681 commit 294b4c4
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 294b4c4

Please sign in to comment.