import classNames from "classnames";
import React, { FunctionComponent as FC } from "react";
import { SVGSearch } from "../icons";

type IconButtonProps = {
  children: Required<JSX.Element>;
  className?: string;
} & Omit<React.ComponentPropsWithoutRef<"div">, "">;

const IconButton: React.FC<IconButtonProps> = ({
  children,
  className,
}): JSX.Element => {
  return className
    ? React.cloneElement(children, {
        className: classNames(className),
      })
    : children;
};
IconButton.displayName = "ButtonIcon";
export default IconButton;
