'use client';

import React, {FC} from 'react';

import {ITypography} from './typography.type';
import {TypographyStyle as S} from './typography.style';

export const TypographyComponent: FC<ITypography> = ({
    children,
    tag,
    contentWrapper,
    ...restProps
}) => {
    return (
        <S.Typography as={tag || 'span'} {...restProps}>
            <span dir='auto' {...contentWrapper}>
                {children}
            </span>
        </S.Typography>
    );
};
