removed the necessity for hardcoded line height variables

This commit is contained in:
Sriram Hariharan
2023-03-08 21:12:14 -06:00
parent c1910bacb0
commit 7dd53f3a94
8 changed files with 57 additions and 68 deletions

View File

@@ -26,17 +26,10 @@ $black_weight: 900;
$x_small_size: 8px;
$small_size: 12px;
$medium_size: 16px;
$large_size: 24px;
$large_size: 20px;
$x_large_size: 32px;
$xx_large_size: 48px;
$x_small_line_height: 12px;
$small_line_height: 16px;
$medium_line_height: 20px;
$large_line_height: 28px;
$x_large_line_height: 36px;
$xx_large_line_height: 52px;
:export {
light_weight: $light_weight;
regular_weight: $regular_weight;
@@ -51,11 +44,4 @@ $xx_large_line_height: 52px;
large_size: $large_size;
x_large_size: $x_large_size;
xx_large_size: $xx_large_size;
x_small_line_height: $x_small_line_height;
small_line_height: $small_line_height;
medium_line_height: $medium_line_height;
large_line_height: $large_line_height;
x_large_line_height: $x_large_line_height;
xx_large_line_height: $xx_large_line_height;
}

View File

@@ -22,18 +22,6 @@ export interface ISizes {
xx_large_size: number;
}
/**
* the type for all the line height scss variables exported from fonts.module.scss
*/
export interface LineHeight {
x_small_line_height: number;
small_line_height: number;
medium_line_height: number;
large_line_height: number;
x_large_line_height: number;
xx_large_line_height: number;
}
/** A utility type that removes the _weight postfix from the variable names for weights */
export type Weight = keyof IWeights extends `${infer U}_weight` ? U : never;
@@ -44,7 +32,7 @@ export type Size = keyof ISizes extends `${infer U}_size` ? U : never;
* This is a file that we need to create to tell typescript what the shape of the css modules is
* when we import them into ts/tsx files
*/
export type IFonts = IWeights & ISizes & LineHeight;
export type IFonts = IWeights & ISizes;
declare const fonts: IFonts;
export default fonts;