UNPKG

@wulperstudio/cms

Version:
45 lines (44 loc) 1.78 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var _react = _interopRequireDefault(require("react")); var _react2 = require("@iconify/react"); var _material = require("@mui/material"); var _styled = require("./styled"); var _jsxRuntime = require("react/jsx-runtime"); var _excluded = ["title", "body", "disabledDivider", "expandIcon", "accordionSummaryProps"]; var WrapperAccordion = function WrapperAccordion(_ref) { var title = _ref.title, body = _ref.body, disabledDivider = _ref.disabledDivider, expandIcon = _ref.expandIcon, accordionSummaryProps = _ref.accordionSummaryProps, props = (0, _objectWithoutProperties2["default"])(_ref, _excluded); return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styled.CAccordion, Object.assign({ variant: props.variant, elevation: props.elevation, square: props.square, radius: props.borderRadius, backgroundColor: props.backgroundColor, color: props.color, borderColor: props.borderColor, disabledDivider: disabledDivider }, props, { children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AccordionSummary, Object.assign({ expandIcon: expandIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: "dashicons:arrow-up-alt2", width: "20px", color: props.color }) }, accordionSummaryProps, { children: title })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AccordionDetails, { children: body })] })); }; var _default = exports["default"] = WrapperAccordion;