UNPKG

@conductionnl/nl-design-system

Version:

NL design system components created by Conduction

28 lines (27 loc) 1.32 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.CollapseBody = void 0; var jsx_runtime_1 = require("react/jsx-runtime"); /** * This components renders a collapse body. * * @returns JSX of the generated CollapseBody. */ function CollapseBody(props) { return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "row" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.items.map(function (item) { return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "col" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "collapse ".concat(props.multiple && "multi-collapse"), id: item.id }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "card card-body" }, { children: item.body }), void 0) }), void 0) }), item.id)); }) }, void 0) }), void 0)); } exports.CollapseBody = CollapseBody; CollapseBody.defaultProps = { multiple: false, };