{"version":3,"sources":["../src/icon-button.tsx"],"sourcesContent":["import type { ReactElement } from \"react\"\nimport type { ButtonProps } from \"./button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { Button } from \"./button\"\n\ninterface IconButtonOptions {\n  /**\n   * The icon to be used in the button.\n   */\n  icon?: ReactElement\n}\n\nexport interface IconButtonProps\n  extends Omit<\n      ButtonProps,\n      | \"endIcon\"\n      | \"leftIcon\"\n      | \"loadingIcon\"\n      | \"loadingPlacement\"\n      | \"loadingText\"\n      | \"rightIcon\"\n      | \"startIcon\"\n    >,\n    IconButtonOptions {}\n\n/**\n * `IconButton` is a component that displays an icon within a button.\n *\n * @see Docs https://yamada-ui.com/components/forms/icon-button\n */\nexport const IconButton = forwardRef<IconButtonProps, \"button\">(\n  ({ className, children, icon, ...rest }, ref) => {\n    return (\n      <Button\n        ref={ref}\n        className={cx(\"ui-icon-button\", className)}\n        p={0}\n        {...rest}\n      >\n        {icon || children}\n      </Button>\n    )\n  },\n)\n\nIconButton.displayName = \"IconButton\"\nIconButton.__ui__ = \"IconButton\"\n"],"mappings":";;;;;;AAEA,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AA+Bb;AAHC,IAAM,aAAa;AAAA,EACxB,CAAC,EAAE,WAAW,UAAU,MAAM,GAAG,KAAK,GAAG,QAAQ;AAC/C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,kBAAkB,SAAS;AAAA,QACzC,GAAG;AAAA,QACF,GAAG;AAAA,QAEH,kBAAQ;AAAA;AAAA,IACX;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;AACzB,WAAW,SAAS;","names":[]}