UNPKG

@smitch/fluid

Version:

A Next/React ui-component libray.

9 lines (8 loc) 899 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { twMerge } from 'tailwind-merge'; import Legend from './Legend'; var Fieldset = function (_a) { var legendText = _a.legendText, disabled = _a.disabled, legendAlign = _a.legendAlign, legendSize = _a.legendSize, _b = _a.hasBorder, hasBorder = _b === void 0 ? false : _b, _c = _a.isBold, isBold = _c === void 0 ? false : _c, children = _a.children, _d = _a.spacing, spacing = _d === void 0 ? '4' : _d, _e = _a.className, className = _e === void 0 ? '' : _e; return (_jsxs("fieldset", { disabled: disabled, className: twMerge("fieldset group border-neutral flex flex-col gap-".concat(spacing, " ").concat(hasBorder ? 'border p-4' : 'border-0'), className), children: [legendText && (_jsx(Legend, { text: legendText, align: legendAlign, legendSize: legendSize, isBold: isBold })), children] })); }; export default Fieldset;