UNPKG

@wulperstudio/cms

Version:
48 lines 1.75 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["title", "color", "backgroundColor"]; import React from 'react'; import { v4 } from 'uuid'; import { Stack, useMediaQuery, useTheme } from '@mui/material'; import { TextForLinesOutput, WTag, WRanking } from '../../../components'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export var IntroductionBloq = function IntroductionBloq(_ref) { var title = _ref.title, tagsProps = _ref.tagsProps, _ref$rating = _ref.rating, rating = _ref$rating === void 0 ? 5.0 : _ref$rating; var theme = useTheme(); var isMqMd = useMediaQuery(theme.breakpoints.down('md')); return /*#__PURE__*/_jsxs(Stack, { rowGap: "10px", children: [/*#__PURE__*/_jsx(TextForLinesOutput, { clines: 1, text: title, fontWeight: "700", variant: "h1" }), /*#__PURE__*/_jsxs(Stack, { alignItems: isMqMd ? 'flex-start' : undefined, direction: isMqMd ? 'column' : 'row', justifyContent: "space-between", rowGap: 1, children: [/*#__PURE__*/_jsx(Stack, { direction: "row", columnGap: "10px", flexWrap: "wrap", rowGap: 2, children: tagsProps.map(function (_ref2) { var titleTag = _ref2.title, color = _ref2.color, backgroundColor = _ref2.backgroundColor, props = _objectWithoutProperties(_ref2, _excluded); return /*#__PURE__*/_jsx(WTag, Object.assign({ backgroundColor: backgroundColor, color: color, title: titleTag }, props), v4()); }) }), /*#__PURE__*/_jsx(WRanking, { rating: rating })] })] }); };