import { twx } from '@/utils';

type IconButtonProp = {
  className?: string;
  icon: string;
  onClick?: () => void;
  iconClass?: string;
};

export const IconButton: React.FC<IconButtonProp> = ({
  className,
  icon,
  onClick,
  iconClass,
}) => {
  return (
    <button
      className={twx([
        'bg-zinc-100 border border-zinc-200 rounded-full h-8 w-8 flex justify-center items-center text-xl',
        className,
      ])}
      onClick={() => onClick?.()}
    >
      <div className={twx(icon, iconClass)} />
    </button>
  );
};
