Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): Typo outline button variant #2393

Merged
merged 11 commits into from
Oct 11, 2022
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