@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
75 lines • 1.71 kB
JavaScript
import { c as _c } from "react-compiler-runtime";
import { forwardRef } from "react";
import classnames from "classnames";
import { jsx as _jsx } from "react/jsx-runtime";
const Card = /*#__PURE__*/forwardRef((t0, ref) => {
const $ = _c(17);
let children;
let className;
let props;
let t1;
let t2;
if ($[0] !== t0) {
({
children,
className,
align: t1,
padding: t2,
...props
} = t0);
$[0] = t0;
$[1] = children;
$[2] = className;
$[3] = props;
$[4] = t1;
$[5] = t2;
} else {
children = $[1];
className = $[2];
props = $[3];
t1 = $[4];
t2 = $[5];
}
const align = t1 === undefined ? "left" : t1;
const padding = t2 === undefined ? "small" : t2;
const t3 = align === "center";
const t4 = padding === "none";
const t5 = padding === "medium";
const t6 = padding === "large";
let t7;
if ($[6] !== className || $[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== t6) {
t7 = classnames("bf-card bfc-base-3-bg bf-break-word", className, {
"bf-card-align-center": t3,
"bf-card-no-padding": t4,
"bf-card-padding-m": t5,
"bf-card-padding-l": t6
});
$[6] = className;
$[7] = t3;
$[8] = t4;
$[9] = t5;
$[10] = t6;
$[11] = t7;
} else {
t7 = $[11];
}
let t8;
if ($[12] !== children || $[13] !== props || $[14] !== ref || $[15] !== t7) {
t8 = /*#__PURE__*/_jsx("div", {
...props,
className: t7,
ref: ref,
children: children
});
$[12] = children;
$[13] = props;
$[14] = ref;
$[15] = t7;
$[16] = t8;
} else {
t8 = $[16];
}
return t8;
});
Card.displayName = "Card";
export default Card;