@hitachivantara/uikit-react-core
Version:
Core React components for the NEXT Design System.
23 lines (22 loc) • 733 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
import { theme } from "@hitachivantara/uikit-styles";
import { fixedForwardRef } from "../types/generic.js";
const sxFn = (sx) => {
return typeof sx === "function" ? sx(theme) : sx;
};
const HvBox = fixedForwardRef(function HvBox2(props, ref) {
const {
style,
component: Component = "div",
sx,
children,
classes,
// Extracted since useDefaultProps creates this prop even if it's not part of the component's API
...restProps
} = useDefaultProps("HvBox", props);
return /* @__PURE__ */ jsx(Component, { style: sx ? sxFn(sx) : style, ref, ...restProps, children });
});
export {
HvBox
};