UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

20 lines (19 loc) 669 B
import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import classNames from "classnames"; /** Create a container for `<Container.Breakpoint>` descendants */ const Container = /*#__PURE__*/ forwardRef(({ className, width = "none", ...props }, ref)=>{ if (typeof width === "number") { width = width + "px"; } return /*#__PURE__*/ _jsx("div", { className: classNames(className, "bf-container"), style: { containIntrinsicWidth: "auto " + width, ...props.style }, ref: ref, ...props }); }); Container.displayName = "Container"; export default Container;