Skip to content

Commit

Permalink
Fix color
Browse files Browse the repository at this point in the history
  • Loading branch information
silvalaura committed Dec 4, 2023
1 parent 18906b2 commit 6738191
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe('Heading', () => {
);
const heading = getByText(headingText);

expect(heading).toHaveStyleRule('color', magma.colors.neutral700);
expect(heading).toHaveStyleRule('color', magma.colors.primary600);
expect(heading).toHaveStyleRule(
'font-family',
magma.headingExpressiveFont
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,66 @@ export const Default = () => {
return (
<>
<Paragraph visualStyle={TypographyVisualStyle.bodyLarge}>
Body Large
Paragraph Body Large
</Paragraph>
<Paragraph visualStyle={TypographyVisualStyle.bodyMedium}>
Body Medium
Paragraph Body Medium
</Paragraph>
<Paragraph visualStyle={TypographyVisualStyle.bodySmall}>
Body Small
Paragraph Body Small
</Paragraph>
<Paragraph visualStyle={TypographyVisualStyle.bodyXSmall}>
Body X-Small
Paragraph Body X-Small
</Paragraph>

<Paragraph
visualStyle={TypographyVisualStyle.bodyLarge}
contextVariant={TypographyContextVariant.narrative}
>
Narrative Large
Paragraph Narrative Large
</Paragraph>
<Paragraph
visualStyle={TypographyVisualStyle.bodyMedium}
contextVariant={TypographyContextVariant.narrative}
>
Narrative Medium
Paragraph Narrative Medium
</Paragraph>
<Paragraph
visualStyle={TypographyVisualStyle.bodySmall}
contextVariant={TypographyContextVariant.narrative}
>
Narrative Small
Paragraph Narrative Small
</Paragraph>
<Paragraph
visualStyle={TypographyVisualStyle.bodyXSmall}
contextVariant={TypographyContextVariant.narrative}
>
Narrative X-Small
Paragraph Narrative X-Small
</Paragraph>

<Paragraph
visualStyle={TypographyVisualStyle.bodyLarge}
contextVariant={TypographyContextVariant.expressive}
>
Expressive Large
Paragraph Expressive Large
</Paragraph>
<Paragraph
visualStyle={TypographyVisualStyle.bodyMedium}
contextVariant={TypographyContextVariant.expressive}
>
Expressive Medium
Paragraph Expressive Medium
</Paragraph>
<Paragraph
visualStyle={TypographyVisualStyle.bodySmall}
contextVariant={TypographyContextVariant.expressive}
>
Expressive Small
Paragraph Expressive Small
</Paragraph>
<Paragraph
visualStyle={TypographyVisualStyle.bodyXSmall}
contextVariant={TypographyContextVariant.expressive}
>
Expressive X-Small
Paragraph Expressive X-Small
</Paragraph>
</>
);
Expand Down
3 changes: 3 additions & 0 deletions packages/react-magma-dom/src/components/Typography/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export function getBodyFontFamily(props) {
export const colorStyles = props => css`
color: ${props.isInverse
? props.theme.colors.neutral100
: props.contextVariant === 'expressive'
? props.theme.colors.primary600
: props.theme.colors.neutral700};
${props.color === TypographyColor.danger &&
Expand Down Expand Up @@ -124,6 +126,7 @@ export const paragraphLargeStyles = props => css`
${props.contextVariant === TypographyContextVariant.expressive &&
css`
color: ${props.theme.colors.neutral700};
font-size: ${props.theme.typographyExpressiveVisualStyles.bodyLarge.mobile
.fontSize};
line-height: ${props.theme.typographyExpressiveVisualStyles.bodyLarge.mobile
Expand Down

0 comments on commit 6738191

Please sign in to comment.