umwd-components 0.1.474 → 0.1.475
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__assign as
|
|
7
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import r from"@mui/material/Paper";import o from"@mui/material/Container";import i from"@mui/material/Grid";import a from"@mui/material/Stack";import{useTheme as n}from"@mui/material/styles";import{setOpacity as m}from"../../lib/utils.js";import{Typography as c,Divider as l}from"@mui/material";import s from"../e-commerce/products/ProductCard.js";import p from"../common/markdown/MarkdownDisplay.js";function d(d){var u,g,x,f=d.data,y=f.maxWidth,v=void 0===y?"lg":y,E=f.sx,b=void 0===E?{}:E,h=f.glass,k=void 0!==h&&h,j=f.previewAmount,w=void 0===j?3:j,C=n();return t.createElement(o,{maxWidth:v,sx:e({my:1},b)},t.createElement(i,{container:!0,spacing:2},t.createElement(i,{item:!0,xs:12},t.createElement(r,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:m(C.palette.background.paper,k?.1:1),border:k?"1px solid rgba(255, 255, 255, 0.15)":"none"}},t.createElement(c,{variant:"h4",component:"a",href:"/shop/categories/".concat(f.category.slug),sx:{textDecoration:"none",color:"inherit"}},f.category.title),(null===(u=f.category)||void 0===u?void 0:u.description)&&"string"==typeof f.category.description&&t.createElement(p,null,f.category.description.substring(0,150)+"..."),null!=(null===(x=null===(g=f.category)||void 0===g?void 0:g.products)||void 0===x?void 0:x.data)&&t.createElement(t.Fragment,null,t.createElement(l,{sx:{my:2}}),t.createElement(a,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around",sx:{pt:2}},f.category.products.data.slice(0,w).map((function(e){return t.createElement(s,{key:e.id,product:e})})),t.createElement(i,{item:!0,xs:12,textAlign:"center"},t.createElement(c,{variant:"body2",component:"a",href:"/shop/categories/".concat(f.category.slug),sx:{textDecoration:"none",color:"inherit"}},"Show all"))))))))}export{d as CategoryBlock};
|