diff --git a/.changeset/tiny-cows-fold.md b/.changeset/tiny-cows-fold.md new file mode 100644 index 00000000000..e83ca1af322 --- /dev/null +++ b/.changeset/tiny-cows-fold.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +Button v2 - Fix font family diff --git a/src/NewButton/styles.ts b/src/NewButton/styles.ts index a2a12961290..6c203e617aa 100644 --- a/src/NewButton/styles.ts +++ b/src/NewButton/styles.ts @@ -191,6 +191,7 @@ export const getBaseStyles = (theme?: Theme) => ({ borderRadius: '2', border: '1px solid', borderColor: theme?.colors.btn.border, + fontFamily: 'inherit', fontWeight: 'bold', lineHeight: TEXT_ROW_HEIGHT, whiteSpace: 'nowrap', diff --git a/src/__tests__/__snapshots__/NewButton.test.tsx.snap b/src/__tests__/__snapshots__/NewButton.test.tsx.snap index 20483a810a1..2da340577e5 100644 --- a/src/__tests__/__snapshots__/NewButton.test.tsx.snap +++ b/src/__tests__/__snapshots__/NewButton.test.tsx.snap @@ -5,6 +5,7 @@ exports[`Button renders consistently 1`] = ` border-radius: 6px; border: 1px solid; border-color: rgba(27,31,36,0.15); + font-family: inherit; font-weight: 600; line-height: 20px; white-space: nowrap; @@ -92,6 +93,7 @@ exports[`Button styles danger button appropriately 1`] = ` .c0 { border-radius: 2; border: 1px solid; + font-family: inherit; font-weight: bold; line-height: 20px; white-space: nowrap; @@ -199,6 +201,7 @@ exports[`Button styles invisible button appropriately 1`] = ` .c0 { border-radius: 2; border: 0; + font-family: inherit; font-weight: bold; line-height: 20px; white-space: nowrap; @@ -286,6 +289,7 @@ exports[`Button styles outline button appropriately 1`] = ` .c0 { border-radius: 2; border: 1px solid; + font-family: inherit; font-weight: bold; line-height: 20px; white-space: nowrap; @@ -393,6 +397,7 @@ exports[`Button styles primary button appropriately 1`] = ` border-radius: 2; border: 1px solid; border-color: border.subtle; + font-family: inherit; font-weight: bold; line-height: 20px; white-space: nowrap;