added material icons

This commit is contained in:
Sriram Hariharan
2023-03-05 17:46:25 -06:00
parent 6147289b40
commit 1f2374927d
5 changed files with 19 additions and 5 deletions

Binary file not shown.

View File

@@ -5,7 +5,7 @@ import fonts, { ISizes, IWeights } from 'src/views/styles/fonts.module.scss';
import styles from './Text.module.scss'; import styles from './Text.module.scss';
type Props = { type Props = {
color?: keyof ISassColors & 'black'; color?: keyof ISassColors;
weight: keyof IWeights; weight: keyof IWeights;
size: keyof ISizes; size: keyof ISizes;
span?: boolean; span?: boolean;
@@ -24,12 +24,14 @@ export default function Text(props: PropsWithChildren<Props>) {
style.textAlign ??= props.align; style.textAlign ??= props.align;
style.color ??= colors?.[props.color ?? 'charcoal']; style.color ??= colors?.[props.color ?? 'charcoal'];
style.fontSize ??= fonts?.[props.size ?? 'medium']; style.fontSize ??= fonts?.[props.size ?? 'medium'];
style.fontWeight ??= fonts?.[props.weight ?? 'bold']; style.fontWeight ??= fonts?.[props.weight ?? 'regular'];
if (props.span) { if (props.span) {
<span className={classNames(styles.text, props.className)} style={style} onClick={props.onClick}> return (
{props.children} <span className={classNames(styles.text, props.className)} style={style} onClick={props.onClick}>
</span>; {props.children}
</span>
);
} }
return ( return (

View File

@@ -1,6 +1,7 @@
$burnt_orange: #bf5700; $burnt_orange: #bf5700;
$charcoal: #333f48; $charcoal: #333f48;
$white: #ffffff; $white: #ffffff;
$black: #000000;
$tangerine: #f8971f; $tangerine: #f8971f;
$sunshine: #ffd600; $sunshine: #ffd600;
$cactus: #a6cd57; $cactus: #a6cd57;
@@ -14,6 +15,7 @@ $limestone: #d6d2c4;
burnt_orange: $burnt_orange; burnt_orange: $burnt_orange;
charcoal: $charcoal; charcoal: $charcoal;
white: $white; white: $white;
black: $black;
tangerine: $tangerine; tangerine: $tangerine;
sunshine: $sunshine; sunshine: $sunshine;
cactus: $cactus; cactus: $cactus;

View File

@@ -6,6 +6,7 @@ export interface ISassColors {
burnt_orange: string; burnt_orange: string;
charcoal: string; charcoal: string;
white: string; white: string;
black: string;
tangerine: string; tangerine: string;
sunshine: string; sunshine: string;
cactus: string; cactus: string;

View File

@@ -8,6 +8,15 @@
} }
} }
/* fallback */
@font-face {
font-family: 'Material Icons Round';
font-style: normal;
font-weight: 400;
font-display: block;
src: url('moz-extension://__MSG_@@extension_id__/fonts/material-icons.woff2') format('woff2');
}
$light: 300; $light: 300;
$regular: 400; $regular: 400;
$medium: 500; $medium: 500;