@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
82 lines (81 loc) • 2.67 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UserReview = void 0;
var _react = _interopRequireDefault(require("react"));
var _uuid = require("uuid");
var _material = require("@mui/material");
var _components = require("../../../components");
var _jsxRuntime = require("react/jsx-runtime");
var UserReview = exports.UserReview = function UserReview(_ref) {
var title = _ref.title,
avatar = _ref.avatar,
icons = _ref.icons,
rowOrder = _ref.rowOrder;
var theme = (0, _material.useTheme)();
var isMqMd = (0, _material.useMediaQuery)(theme.breakpoints.down('md'));
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
rowGap: isMqMd ? '25px' : '15px',
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
sx: {
order: rowOrder == null ? void 0 : rowOrder.row1
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextForLinesOutput, {
clines: 1,
text: title,
fontWeight: "700",
variant: "h1"
})
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
sx: {
order: rowOrder == null ? void 0 : rowOrder.row2
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CustomCmpText, {
direction: "row",
spacing: 2,
typographyProps: {
children: avatar.text
},
customComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
sx: {
width: 45,
height: 45
},
src: avatar.url
})
})
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
sx: {
order: rowOrder == null ? void 0 : rowOrder.row3
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
direction: "row",
rowGap: 2,
alignItems: "center",
flexWrap: "wrap",
columnGap: 2,
children: icons.map(function (_ref2) {
var text = _ref2.text,
icon = _ref2.icon;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CustomCmpText, {
direction: "row",
spacing: 0.5,
stackProps: {
alignItems: 'center'
},
typographyProps: {
children: text,
fontSize: '14px',
fontWeight: '400'
},
customComponent: icon
})
}, (0, _uuid.v4)());
})
})
})]
});
};