import type { FC } from 'react';
import styled from 'styled-components';
import type { BaseElementProps } from './types';

const Span = styled.span`
  margin-bottom: 18px;
  font-size: 0.85rem;
`;

type TextProps = {
  middleware: (value: any) => string;
};

export default (function Text({ value, ...props }: BaseElementProps<string> & TextProps) {
  return <Span {...props}>{value}</Span>;
} as FC<TextProps>);
