diff --git a/assets/fonts/Inter-VariableFont.ttf b/assets/fonts/Inter-VariableFont.ttf
new file mode 100644
index 0000000..baee04f
Binary files /dev/null and b/assets/fonts/Inter-VariableFont.ttf differ
diff --git a/assets/fonts/Inter-VariableFont.woff2 b/assets/fonts/Inter-VariableFont.woff2
new file mode 100644
index 0000000..765da81
Binary files /dev/null and b/assets/fonts/Inter-VariableFont.woff2 differ
diff --git a/assets/fonts/OpenSans-VariableFont.ttf b/assets/fonts/OpenSans-VariableFont.ttf
deleted file mode 100644
index 51dd3c3..0000000
Binary files a/assets/fonts/OpenSans-VariableFont.ttf and /dev/null differ
diff --git a/assets/fonts/OpenSans-VariableFont.woff2 b/assets/fonts/OpenSans-VariableFont.woff2
deleted file mode 100644
index 15ee895..0000000
Binary files a/assets/fonts/OpenSans-VariableFont.woff2 and /dev/null differ
diff --git a/src/components/Typography/Typography.module.scss b/src/components/Typography/Typography.module.scss
index 7120a72..250846a 100644
--- a/src/components/Typography/Typography.module.scss
+++ b/src/components/Typography/Typography.module.scss
@@ -2,7 +2,7 @@
@use '../../styles/fonts.module';
.text {
- font-family: 'Open Sans', serif;
+ font-family: 'Inter', serif;
}
.type {
@@ -23,6 +23,10 @@
}
}
-.with-weight {
- font-weight: var(--typo-weight);
+.weight {
+ @each $weight, $_ in fonts.$weights{
+ &--#{$weight}{
+ font-weight: fonts.getWeight($weight);
+ }
+ }
}
diff --git a/src/components/Typography/Typography.stories.tsx b/src/components/Typography/Typography.stories.tsx
index 244261a..692d980 100644
--- a/src/components/Typography/Typography.stories.tsx
+++ b/src/components/Typography/Typography.stories.tsx
@@ -26,4 +26,6 @@ export const DefaultStory = (args: TypographyProps) => ;
DefaultStory.args = {
children: 'Sample text uwu',
textType: 'heading1',
+ displayType: 'desktop',
+ textWeight: 'bold',
};
diff --git a/src/components/Typography/index.tsx b/src/components/Typography/index.tsx
index f0e10e3..035a88e 100644
--- a/src/components/Typography/index.tsx
+++ b/src/components/Typography/index.tsx
@@ -1,14 +1,16 @@
import cx from 'classnames';
import { forwardRef } from 'react';
-import { Colors, TextTypes } from '../../styles';
+import { Colors, TextTypes, Weights, DisplayTypes } from '../../styles';
import { ComponentWithAs } from '../../types';
import styles from './Typography.module.scss';
export type TypographyProps = ComponentWithAs<{
/** Font weight */
- textWeight?: number;
+ textWeight: Weights;
/** Type of text based on theme */
textType: TextTypes;
+ /** Display type */
+ displayType: DisplayTypes;
/** Colors based on theme */
textColor?: Colors;
/** Name of the class */
@@ -23,6 +25,7 @@ const Typography = forwardRef(
textWeight,
textColor,
textType,
+ displayType,
...props
},
ref,
@@ -30,13 +33,17 @@ const Typography = forwardRef(
return (