DONE: Full typography

CHANGES: Everywhere change <span> labels to <Typography>
FIXED: Imports in SASS files
This commit is contained in:
2024-02-17 21:11:14 +04:00
committed by doryan
parent 16040245a7
commit 1f6343c07b
19 changed files with 956 additions and 205 deletions

View File

@@ -0,0 +1,32 @@
import { TypographyRole, TypographySize } from './typography.types';
export function getTypographyRole(role: TypographyRole, size: TypographySize) {
switch (role) {
case 'display':
return 'h1';
case 'headline':
switch (size) {
case 'large' || 'hero' || 'xl':
return 'h2';
case 'medium':
return 'h3';
case 'small':
return 'h4';
}
break;
case 'title':
switch (size) {
case 'large' || 'hero' || 'xl':
return 'h4';
case 'medium':
return 'h5';
case 'small':
return 'h6';
}
break;
case 'body':
return 'p';
case 'label':
return 'label';
}
}