1
import React from 'react';
2
import styles from './text.css';
3
import classNames from 'classnames';
5
type TSizes = 28 | 20 | 16 | 14 | 12 | 10;
21
As?: 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p' | 'div';
22
children?: React.ReactNode;
31
export function Text(props: ITextProps) {
32
const {As = 'span', color = EColors.black, children, size, mobileSize, tabletSize, desktopSize, bold} = props;
33
const classes = classNames(
35
{ [styles.bold]: bold},
36
{[styles[`m${mobileSize}`]]: mobileSize},
37
{[styles[`t${tabletSize}`]]: tabletSize},
38
{[styles[`d${desktopSize}`]]: desktopSize},
42
<As className={classes}>