UNPKG

@hitachivantara/uikit-react-core

Version:

Core React components for the NEXT Design System.

36 lines (35 loc) 825 B
import { jsx } from "react/jsx-runtime"; import { useDefaultProps } from "@hitachivantara/uikit-react-utils"; import { fixedForwardRef } from "../types/generic.js"; import { HvButton } from "../Button/Button.js"; import { HvTooltip } from "../Tooltip/Tooltip.js"; const HvIconButton = fixedForwardRef(function HvIconButton2(props, ref) { const { title, placement = "top", enterDelay = 500, tooltipProps, ...others } = useDefaultProps("HvIconButton", props); return /* @__PURE__ */ jsx( HvTooltip, { title, enterDelay, placement, ...tooltipProps, children: /* @__PURE__ */ jsx( HvButton, { icon: true, ref, focusableWhenDisabled: true, ...others } ) } ); }); export { HvIconButton };