import _extends from "@babel/runtime/helpers/esm/extends";
import React, { forwardRef } from "react";
import { StyledIconButton } from "./Styles";

// eslint-disable-next-line @typescript-eslint/no-empty-interface

/**
 * @component IconButton
 * @description
 * IconButton composes the Button component except that it renders only an icon.
 * Since IconButton only renders an icon, you have to pass the aria-label prop,
 * so screen readers can give meaning to the button.
 *
 * @props See Button props.
 *
 * @example
 * return (
 *   <IconButton className="mr-2" variant="primary" size="medium" aria-label="Close dialog">
 *     <CloseIcon />
 *   </IconButton>
 * )
 * @see
 * https://system.activecollab.com/?path=/story/components-button-indicators-button--icon-button
 * https://design.activecollab.com/docs/components/button
 */

export const IconButton = /*#__PURE__*/forwardRef((_ref, ref) => {
  let {
    children,
    className,
    variant,
    size,
    active,
    ...args
  } = _ref;
  return /*#__PURE__*/React.createElement(StyledIconButton, _extends({
    className: className,
    variant: variant,
    size: size,
    active: active,
    ref: ref
  }, args), children);
});
IconButton.displayName = "IconButton";
//# sourceMappingURL=IconButton.js.map