Skip to content

Commit

Permalink
Add outline background and border color (#1928)
Browse files Browse the repository at this point in the history
* Add outline background and border color

* Fix up test

* Create three-papayas-beg.md
  • Loading branch information
pksjce committed Mar 7, 2022
1 parent 92a0237 commit 4dc15c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-papayas-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Add outline background and border color
2 changes: 2 additions & 0 deletions src/Button2/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme
outline: {
color: 'btn.outline.text',
boxShadow: `${theme?.shadows.btn.shadow}`,
borderColor: 'btn.border',
backgroundColor: 'btn.bg',

'&:hover:not([disabled])': {
color: 'btn.outline.hoverText',
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/__snapshots__/Button2.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ exports[`Button styles outline button appropriately 1`] = `
.c0 {
border-radius: 2;
border: 1px solid;
border-color: btn.border;
font-family: inherit;
font-weight: bold;
line-height: 20px;
Expand All @@ -310,6 +311,7 @@ exports[`Button styles outline button appropriately 1`] = `
font-size: 14px;
color: btn.outline.text;
box-shadow: undefined;
background-color: btn.bg;
}
.c0:focus {
Expand Down

0 comments on commit 4dc15c3

Please sign in to comment.