UNPKG

@wulperstudio/cms

Version:
75 lines 3.3 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["sx", "component"], _excluded2 = ["variant", "component", "color", "fontWeight", "textAlign", "gutterBottom"], _excluded3 = ["variant", "component", "color", "textAlign"]; import React from 'react'; import { Box, Typography } from '@mui/material'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export var AssetTitleDescriptionBtn = function AssetTitleDescriptionBtn(_ref) { var children = _ref.children, asset = _ref.asset, title = _ref.title, description = _ref.description, containerProps = _ref.containerProps, containerTexts = _ref.containerTexts, descriptionProps = _ref.descriptionProps, titleProps = _ref.titleProps; var _ref2 = containerProps || {}, sx = _ref2.sx, _ref2$component = _ref2.component, component = _ref2$component === void 0 ? 'article' : _ref2$component, rest = _objectWithoutProperties(_ref2, _excluded); var _ref3 = titleProps || {}, _ref3$variant = _ref3.variant, variantTitle = _ref3$variant === void 0 ? 'h3' : _ref3$variant, _ref3$component = _ref3.component, componentTitle = _ref3$component === void 0 ? 'h3' : _ref3$component, _ref3$color = _ref3.color, colorTitle = _ref3$color === void 0 ? 'text.primary' : _ref3$color, _ref3$fontWeight = _ref3.fontWeight, fontWeightTitle = _ref3$fontWeight === void 0 ? 700 : _ref3$fontWeight, _ref3$textAlign = _ref3.textAlign, textAlignTitle = _ref3$textAlign === void 0 ? 'center' : _ref3$textAlign, _ref3$gutterBottom = _ref3.gutterBottom, gutterBottomTitle = _ref3$gutterBottom === void 0 ? true : _ref3$gutterBottom, restTitleProps = _objectWithoutProperties(_ref3, _excluded2); var _ref4 = descriptionProps || {}, _ref4$variant = _ref4.variant, variantDescription = _ref4$variant === void 0 ? 'body1' : _ref4$variant, _ref4$component = _ref4.component, componentDescription = _ref4$component === void 0 ? 'p' : _ref4$component, _ref4$color = _ref4.color, colorDescription = _ref4$color === void 0 ? 'text.secondary' : _ref4$color, _ref4$textAlign = _ref4.textAlign, textAlignDescription = _ref4$textAlign === void 0 ? 'center' : _ref4$textAlign, restDescriptionProps = _objectWithoutProperties(_ref4, _excluded3); return /*#__PURE__*/_jsxs(Box, Object.assign({ sx: Object.assign({ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 3 }, sx), component: component }, rest, { children: [asset, /*#__PURE__*/_jsxs(Box, Object.assign({}, containerTexts, { children: [/*#__PURE__*/_jsx(Typography, Object.assign({ component: componentTitle, variant: variantTitle, fontWeight: fontWeightTitle, color: colorTitle, textAlign: textAlignTitle, gutterBottom: gutterBottomTitle }, restTitleProps, { children: title })), description && /*#__PURE__*/_jsx(Typography, Object.assign({ component: componentDescription, variant: variantDescription, color: colorDescription, textAlign: textAlignDescription }, restDescriptionProps, { children: description }))] })), children] })); };