UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

35 lines 924 B
/* eslint-disable @typescript-eslint/no-explicit-any */ import { forwardRef } from "react"; import classNames from "classnames"; import { jsx as _jsx } from "react/jsx-runtime"; const GridSpan = /*#__PURE__*/forwardRef(({ cols = 1, small, medium, large, xl, xxl, style, className, children, ...props }, ref) => { const styles = { ...style, ["--bf-grid-span"]: cols, ["--bf-grid-span-s"]: small ?? cols, ["--bf-grid-span-m"]: medium ?? small ?? cols, ["--bf-grid-span-l"]: large ?? medium ?? small ?? cols, ["--bf-grid-span-xl"]: xl ?? large ?? medium ?? small ?? cols, ["--bf-grid-span-xxl"]: xxl ?? xl ?? large ?? medium ?? small ?? cols }; return /*#__PURE__*/_jsx("div", { ...props, className: classNames("bf-grid-span", className), style: styles, ref: ref, children: children }); }); GridSpan.displayName = "Grid.Span"; export default GridSpan;