import { IconProps } from '@theme/components/types';
import clsx from 'clsx';

export const Icon = (props: IconProps) => {
  const { name, size, className, style, ...rest } = props;

  return (
    <i
      className={clsx(`flex pz-icon-${name}`, className)}
      {...rest}
      style={{
        ...style,
        ...(size && { fontSize: `${size}px` })
      }}
    />
  );
};
