/* ! * (c) Copyright 2025 Palantir Technologies Inc. All rights reserved. */ import classNames from "classnames"; import { forwardRef, useMemo } from "react"; import { Classes, DISPLAYNAME_PREFIX } from "../../common"; import { Slot } from "../slot/slot"; import type { BoxProps } from "./boxProps"; import { buildStyles } from "./buildStyles"; /** * Box component. * * @see https://blueprintjs.com/docs/#labs/components/box */ export const Box = forwardRef(function Box({ asChild, className, ...props }, ref) { const Component = asChild ? Slot : "div"; const { generatedClassNames, passThroughProps } = useMemo(() => buildStyles(props), [props]); return ( ); }); Box.displayName = `${DISPLAYNAME_PREFIX}.Box`;