UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

20 lines (19 loc) 718 B
import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import classNames from "classnames"; const Inline = /*#__PURE__*/ forwardRef(({ children, gap = 12, align = "top", ...props }, ref)=>{ const alignment = align === "bottom" ? "flex-end" : align === "center" ? "center" : "flex-start"; return /*#__PURE__*/ _jsx("div", { ...props, className: classNames("bf-inline", props?.className), style: { alignItems: alignment, "--bf-inline-gap": typeof gap === "number" ? gap + "px" : gap, ...props?.style }, ref: ref, children: children }); }); Inline.displayName = "Inline"; export default Inline;