import * as React from 'react'; import classnames from 'classnames'; import styles from './TextBase.scss'; import ILocalContainerProps from '../../../../common/structures/ILocalContainerProps'; import { Container } from '../../../modules/Container/Container'; export enum TextBasePropColor { gray_gray25_title = 'gray_gray25_title', gray25_text = 'gray25_text', graydark_gray15_text = 'graydark_gray15_text', gray_gray15_text = 'gray_gray15_text', graydark_white_caption = 'graydark_white_caption', } export enum TextBasePropFontSize { s = 's', m = 'm', l = 'l', xl = 'xl', } export enum TextBasePropFontWeight { normal = 'normal', bold = 'bold', heavy = 'heavy', } export interface ITextCommonProps extends ILocalContainerProps { /** The html element tag used for the component. */ tag?: string; } export interface ITextBaseProps extends ITextCommonProps { /** The color applied to the component. */ color?: TextBasePropColor | keyof typeof TextBasePropColor; /** The font-size applied to the component. */ fontSize?: TextBasePropFontSize | keyof typeof TextBasePropFontSize; /** The font-weight applied to the component. */ fontWeight?: TextBasePropFontWeight | keyof typeof TextBasePropFontWeight; } export class TextBase extends React.Component { static defaultProps: Partial = { color: TextBasePropColor.graydark_white_caption, fontSize: TextBasePropFontSize.s, fontWeight: TextBasePropFontWeight.normal, tag: 'span', }; render () { const { children, color, container, className, fontSize, fontWeight, id, style, tag, ...otherProps } = this.props; const Tag: any = tag; return ( {children} ); } }