import React, { Fragment, FC, ReactNode } from 'react';
import css from './index.module.css';
export interface TextProps {
  title: string;
  text?: ReactNode;
}

const Text: FC<TextProps> = ({ title, text }) => (
  <Fragment>
    <div className={css.text__wrap}>
      {title && <h3>{title}</h3>}
      {text && <div>{text}</div>}
    </div>
  </Fragment>
);

export default Text;
