added material icons
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user