added material icons
This commit is contained in:
BIN
public/fonts/material-icons.woff2
Normal file
BIN
public/fonts/material-icons.woff2
Normal file
Binary file not shown.
@@ -5,7 +5,7 @@ import fonts, { ISizes, IWeights } from 'src/views/styles/fonts.module.scss';
|
||||
import styles from './Text.module.scss';
|
||||
|
||||
type Props = {
|
||||
color?: keyof ISassColors & 'black';
|
||||
color?: keyof ISassColors;
|
||||
weight: keyof IWeights;
|
||||
size: keyof ISizes;
|
||||
span?: boolean;
|
||||
@@ -24,12 +24,14 @@ export default function Text(props: PropsWithChildren<Props>) {
|
||||
style.textAlign ??= props.align;
|
||||
style.color ??= colors?.[props.color ?? 'charcoal'];
|
||||
style.fontSize ??= fonts?.[props.size ?? 'medium'];
|
||||
style.fontWeight ??= fonts?.[props.weight ?? 'bold'];
|
||||
style.fontWeight ??= fonts?.[props.weight ?? 'regular'];
|
||||
|
||||
if (props.span) {
|
||||
<span className={classNames(styles.text, props.className)} style={style} onClick={props.onClick}>
|
||||
{props.children}
|
||||
</span>;
|
||||
return (
|
||||
<span className={classNames(styles.text, props.className)} style={style} onClick={props.onClick}>
|
||||
{props.children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
$burnt_orange: #bf5700;
|
||||
$charcoal: #333f48;
|
||||
$white: #ffffff;
|
||||
$black: #000000;
|
||||
$tangerine: #f8971f;
|
||||
$sunshine: #ffd600;
|
||||
$cactus: #a6cd57;
|
||||
@@ -14,6 +15,7 @@ $limestone: #d6d2c4;
|
||||
burnt_orange: $burnt_orange;
|
||||
charcoal: $charcoal;
|
||||
white: $white;
|
||||
black: $black;
|
||||
tangerine: $tangerine;
|
||||
sunshine: $sunshine;
|
||||
cactus: $cactus;
|
||||
|
||||
1
src/views/styles/colors.module.scss.d.ts
vendored
1
src/views/styles/colors.module.scss.d.ts
vendored
@@ -6,6 +6,7 @@ export interface ISassColors {
|
||||
burnt_orange: string;
|
||||
charcoal: string;
|
||||
white: string;
|
||||
black: string;
|
||||
tangerine: string;
|
||||
sunshine: string;
|
||||
cactus: string;
|
||||
|
||||
@@ -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;
|
||||
$regular: 400;
|
||||
$medium: 500;
|
||||
|
||||
Reference in New Issue
Block a user