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

View File

@@ -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 (