Skip to content

Commit

Permalink
Dialog v1: Fix title font family (#4246)
Browse files Browse the repository at this point in the history
* don't need to set fontFamily, inherit it

* Create hot-hounds-speak.md

* test(vrt): update snapshots

---------

Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>
  • Loading branch information
siddharthkp and siddharthkp committed Feb 12, 2024
1 parent 236fa34 commit 2aced1c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-hounds-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Dialog v1: Fix font-family for title
2 changes: 1 addition & 1 deletion packages/react/src/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const Default = () => {
<div data-testid="inner">
<Dialog.Header id="header">Title</Dialog.Header>
<Box p={3}>
<Text fontFamily="sans-serif">Some content</Text>
<Text>Some content</Text>
</Box>
</div>
</Dialog>
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export type DialogHeaderProps = ComponentProps<typeof DialogHeaderBase>
function DialogHeader({theme, children, backgroundColor = 'canvas.subtle', ...rest}: DialogHeaderProps) {
if (React.Children.toArray(children).every(ch => typeof ch === 'string')) {
children = (
<Text theme={theme} color="fg.default" fontSize={1} fontWeight="bold" fontFamily="sans-serif">
<Text fontSize={1} fontWeight="bold">
{children}
</Text>
)
Expand Down

0 comments on commit 2aced1c

Please sign in to comment.