UNPKG

@wulperstudio/cms

Version:
88 lines 2.42 kB
import React from 'react'; import { Grid, Box, Typography } from '@mui/material'; import { TextForLinesOutput } from '../TextForLinesOutput'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; var ImageTextOutput = function ImageTextOutput(_ref) { var text = _ref.text, image = _ref.image, title = _ref.title, cardTable = _ref.cardTable, borderRadiusImage = _ref.borderRadiusImage, clinesText = _ref.clinesText; if (cardTable) { return /*#__PURE__*/_jsxs(Grid, { container: true, alignItems: "center", columnGap: "12px", sx: { flexGrow: 0, width: 'auto', padding: '7px 7px 7px 0px', flexWrap: 'nowrap' }, children: [/*#__PURE__*/_jsx(Grid, { item: true, children: /*#__PURE__*/_jsx(Box, { sx: { background: image ? "url(".concat(image, ")") : '#edecfa', width: 50, height: 50, borderRadius: borderRadiusImage, backgroundSize: 'cover' } }) }), /*#__PURE__*/_jsxs(Grid, { item: true, xs: true, children: [/*#__PURE__*/_jsx(TextForLinesOutput, { text: title || '', clines: 2, color: "#3D3769", fontSize: "16px", fontWeight: "600" }), /*#__PURE__*/_jsx(Typography, { variant: "body2", component: "p", sx: { color: '#B2BEDA' }, children: /*#__PURE__*/_jsx(TextForLinesOutput, { text: text, clines: clinesText || 1 }) })] })] }); } return /*#__PURE__*/_jsxs(Grid, { container: true, alignItems: "center", columnGap: "12px", sx: { flexGrow: 0, width: 'auto', padding: '7px 7px 7px 0px', flexWrap: 'nowrap' }, children: [/*#__PURE__*/_jsx(Grid, { item: true, children: /*#__PURE__*/_jsx(Box, { sx: { background: image ? "url(".concat(image, ")") : '#edecfa', width: 50, height: 50, borderRadius: borderRadiusImage, backgroundSize: 'cover' } }) }), /*#__PURE__*/_jsx(Grid, { item: true, xs: true, children: /*#__PURE__*/_jsx(TextForLinesOutput, { text: text, clines: clinesText || 1 }) })] }); }; export default ImageTextOutput;