import React from 'react';
import cx from 'classnames';
import { IconProps } from './.types/IconPropsType';

export function Icon({
  className = 'fill-neutral-primary dark:fill-yellow-primary',
  children,
  containerSize = '24',
  iconSize = '16',
  ...rest
}: IconProps) {
  const classes = cx(`gc-icon ${className}`, {
    [`gc-icon-container-${containerSize}`]: containerSize,
    [`gc-icon-${iconSize}`]: iconSize,
  });

  return (
    <span {...rest} className={classes}>
      {children}
    </span>
  );
}
