diff --git a/packages/lsd-react/src/components/Theme/baseTheme.ts b/packages/lsd-react/src/components/Theme/baseTheme.ts index e097848..f92c00a 100644 --- a/packages/lsd-react/src/components/Theme/baseTheme.ts +++ b/packages/lsd-react/src/components/Theme/baseTheme.ts @@ -107,21 +107,41 @@ export const baseTheme: Theme = { }, }, typography: { - display1: { fontSize: '5.625rem', lineHeight: '6.125rem' }, - display2: { fontSize: '3.5625rem', lineHeight: '4rem' }, - h1: { fontSize: '2.875rem', lineHeight: '3.25rem' }, - h2: { fontSize: '2.25rem', lineHeight: '2.75rem' }, - h3: { fontSize: '2rem', lineHeight: '2.5rem' }, - h4: { fontSize: '1.75rem', lineHeight: '2.25rem' }, - h5: { fontSize: '1.5rem', lineHeight: '2rem' }, - h6: { fontSize: '1.375rem', lineHeight: '1.75rem' }, - subtitle1: { fontSize: '1rem', lineHeight: '1.5rem' }, - subtitle2: { fontSize: '0.875rem', lineHeight: '1.25rem' }, - body1: { fontSize: '1rem', lineHeight: '1.5rem' }, - body2: { fontSize: '0.875rem', lineHeight: '1.25rem' }, - body3: { fontSize: '0.75rem', lineHeight: '1rem' }, - label1: { fontSize: '0.875rem', lineHeight: '1.25rem' }, - label2: { fontSize: '0.75rem', lineHeight: '1rem' }, + display1: { + fontSize: '5.625rem', + fontWeight: 'normal', + lineHeight: '6.125rem', + }, + display2: { + fontSize: '3.5625rem', + fontWeight: 'normal', + lineHeight: '4rem', + }, + h1: { fontSize: '2.875rem', fontWeight: 'normal', lineHeight: '3.25rem' }, + h2: { fontSize: '2.25rem', fontWeight: 'normal', lineHeight: '2.75rem' }, + h3: { fontSize: '2rem', fontWeight: 'normal', lineHeight: '2.5rem' }, + h4: { fontSize: '1.75rem', fontWeight: 'normal', lineHeight: '2.25rem' }, + h5: { fontSize: '1.5rem', fontWeight: 'normal', lineHeight: '2rem' }, + h6: { fontSize: '1.375rem', fontWeight: 'normal', lineHeight: '1.75rem' }, + subtitle1: { fontSize: '1rem', fontWeight: 'normal', lineHeight: '1.5rem' }, + subtitle2: { + fontSize: '0.875rem', + fontWeight: 'normal', + lineHeight: '1.25rem', + }, + body1: { fontSize: '1rem', fontWeight: 'normal', lineHeight: '1.5rem' }, + body2: { + fontSize: '0.875rem', + fontWeight: 'normal', + lineHeight: '1.25rem', + }, + body3: { fontSize: '0.75rem', fontWeight: 'normal', lineHeight: '1rem' }, + label1: { + fontSize: '0.875rem', + fontWeight: 'normal', + lineHeight: '1.25rem', + }, + label2: { fontSize: '0.75rem', fontWeight: 'normal', lineHeight: '1rem' }, }, typographyGlobal: { genericFontFamily: 'sans-serif', diff --git a/packages/lsd-react/src/components/Theme/constants.ts b/packages/lsd-react/src/components/Theme/constants.ts index f4ee262..5d5a2e4 100644 --- a/packages/lsd-react/src/components/Theme/constants.ts +++ b/packages/lsd-react/src/components/Theme/constants.ts @@ -43,6 +43,7 @@ export const THEME_TYPOGRAPHY_ELEMENTS: Partial< export const THEME_TYPOGRAPHY_PROPERTIES = [ 'fontSize', + 'fontWeight', 'lineHeight', ] as TypographyProperties[] diff --git a/packages/lsd-react/src/components/Theme/types.ts b/packages/lsd-react/src/components/Theme/types.ts index 080249b..e44f074 100644 --- a/packages/lsd-react/src/components/Theme/types.ts +++ b/packages/lsd-react/src/components/Theme/types.ts @@ -25,7 +25,7 @@ export type VariantThemeProperties = keyof Pick export type TypographyStyles = Pick< CSSProperties, - 'fontSize' | 'lineHeight' + 'fontSize' | 'fontWeight' | 'lineHeight' > & { fontFamily?: string } export type GlobalTypographyStyles = { genericFontFamily: TypographyGenericFontFamily diff --git a/packages/lsd-react/src/components/Typography/Typography.styles.ts b/packages/lsd-react/src/components/Typography/Typography.styles.ts index 38a1ce6..000c7af 100644 --- a/packages/lsd-react/src/components/Typography/Typography.styles.ts +++ b/packages/lsd-react/src/components/Typography/Typography.styles.ts @@ -50,7 +50,7 @@ export const TypographyStyles = css` (variant) => css` ${selectors(variant)} { color: rgb(var(--lsd-text-primary)); - font-weight: normal; + font-weight: var(--lsd-${variant}-fontWeight); font-size: var(--lsd-${variant}-fontSize); line-height: var(--lsd-${variant}-lineHeight); } @@ -60,7 +60,7 @@ export const TypographyStyles = css` input { color: rgb(var(--lsd-text-primary)); font-size: var(--lsd-body1-fontSize); - font-weight: normal; + font-weight: var(--lsd-body1-fontWeight); } h1,