import React from 'react';
import { getStyleObjectFromString } from '../utils/style';
import Css from './tag.module.css';

export type Props = {
  style?: string;
  tag: string;
};

export const Tag = (props: Props): JSX.Element => {
  const inlineStyle = getStyleObjectFromString(props.style || '');
  return (
    <>
      <span> </span>
      <span className={Css.tag} style={inlineStyle}>
        {props.tag}
      </span>
    </>
  );
};
