import React           from 'react';
import './link.styles.scss'
import { cn }          from '../../util/bem';

interface IProps {
  id?: string;
  onClick?: () => void;
  children?: JSX.Element | JSX.Element[] | string;
  fontSize?: string;
  style?: any;
}
const className = cn('link')
export const Link = ({
                       onClick, children, fontSize, style, id = ''
                     }: IProps) => (
  <a className={className('root')} id={ id } onClick={ onClick } style={ style ? {...style, fontSize} : {fontSize} }>
    <p
      className="link-component"
    >
      { children }
    </p>
  </a>
);
