Skip to content

Commit

Permalink
Adds semibold font weight to Text component (#1296)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Basuil <[email protected]>
  • Loading branch information
kyleshike and jasonbasuil authored Oct 15, 2024
1 parent 11639b4 commit a85237a
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions scss/css_properties.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
--synth-font-family: Inter, sans-serif;
--synth-font-weight-regular: 400;
--synth-font-weight-medium: 500;
--synth-font-weight-semibold: 600;
--synth-font-weight-bold: 700;
--synth-font-size-base: 0.875rem;

Expand Down
2 changes: 1 addition & 1 deletion scss/global.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import './baseline';
@import './css_properties.scss';
@import './theme';
2 changes: 1 addition & 1 deletion src/Container/Col.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function Col({
xxl={xxl}
{...props}
>
{ children }
{children}
</ReactBootstrapCol>
);
}
2 changes: 1 addition & 1 deletion src/Container/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function Container({
fluid={fluid}
{...props}
>
{ children }
{children}
</ReactBootstrapContainer>
);
}
2 changes: 1 addition & 1 deletion src/Container/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function Row({
xxl={xxl}
{...props}
>
{ children }
{children}
</ReactBootstrapRow>
);
}
2 changes: 1 addition & 1 deletion src/Text/Text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Adjust the font `size` with the available sizes:

Use to give text one of the supported font weights:

`bold`, `medium`, or `regular`
`bold`, `semibold`, `medium`, or `regular`

<Canvas of={ComponentStories.Weight} />

Expand Down
4 changes: 4 additions & 0 deletions src/Text/Text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
font-weight: var(--synth-font-weight-bold);
}

&--semibold {
font-weight: var(--synth-font-weight-semibold);
}

&--medium {
font-weight: var(--synth-font-weight-medium);
}
Expand Down
1 change: 1 addition & 0 deletions src/Text/Text.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function Weight() {
return (
<>
<Text weight="bold">Source from a pool of more than 2.1 million participants to reach nearly any target audience.</Text>
<Text weight="semibold">Source from a pool of more than 2.1 million participants to reach nearly any target audience.</Text>
<Text weight="medium">Source from a pool of more than 2.1 million participants to reach nearly any target audience.</Text>
<Text weight="regular">Source from a pool of more than 2.1 million participants to reach nearly any target audience.</Text>
</>
Expand Down
1 change: 1 addition & 0 deletions src/Text/Text.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const TEXT_PROPS = {
weight: {
bold: 'bold',
medium: 'medium',
semibold: 'semibold',
regular: 'regular',
},
} as const;

0 comments on commit a85237a

Please sign in to comment.