@graphcommerce/magento-product 3.0.22 → 3.0.23

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.23](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-product@3.0.22...@graphcommerce/magento-product@3.0.23) (2021-10-11)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **product-pages:** remove top spacing short descriptions ([7ba7d32](https://github.com/ho-nl/m2-pwa/commit/7ba7d321d8eaf1d323047b87c6c086e9445f5263))
12
+ * **section-heeader-filter-items:** remove large paddings ([18f4d77](https://github.com/ho-nl/m2-pwa/commit/18f4d77e4eb1b029bf2e5656b753e2f18fde90ab))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [3.0.18](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-product@3.0.17...@graphcommerce/magento-product@3.0.18) (2021-10-08)
7
19
 
8
20
 
@@ -26,7 +26,7 @@ type FilterEqualTypeProps = NonNullable<
26
26
  const useFilterEqualStyles = makeStyles(
27
27
  (theme: Theme) => ({
28
28
  listItem: {
29
- padding: `${theme.spacings.xxs} ${theme.spacings.xxs} 0`,
29
+ padding: `0 ${theme.spacings.xxs} 0`,
30
30
  display: 'block',
31
31
  '&:not(:nth-last-of-type(-n+2)) > div': {
32
32
  borderBottom: `1px solid ${theme.palette.divider}`,
@@ -45,7 +45,7 @@ const useFilterEqualStyles = makeStyles(
45
45
  },
46
46
  checkbox: {
47
47
  padding: 0,
48
- margin: '3px 0 0 8px',
48
+ margin: '-10px 0 0 0',
49
49
  float: 'right',
50
50
  },
51
51
  linkContainer: {
@@ -1,8 +1,6 @@
1
1
  fragment ProductPageDescription on ProductInterface {
2
2
  name
3
- short_description {
4
- html
5
- }
3
+ ...ProductShortDescription
6
4
  description {
7
5
  html
8
6
  }
@@ -0,0 +1,5 @@
1
+ fragment ProductShortDescription on ProductInterface {
2
+ short_description {
3
+ html
4
+ }
5
+ }
@@ -0,0 +1,33 @@
1
+ import { UseStyles } from '@graphcommerce/next-ui'
2
+ import { makeStyles, Theme, Typography } from '@material-ui/core'
3
+ import React from 'react'
4
+ import { ProductShortDescriptionFragment } from './ProductShortDescription.gql'
5
+
6
+ const useStyles = makeStyles(
7
+ (theme: Theme) => ({
8
+ root: {
9
+ '& > p': {
10
+ marginTop: 0,
11
+ },
12
+ },
13
+ }),
14
+ {
15
+ name: 'ProductShortDescription',
16
+ },
17
+ )
18
+
19
+ type ProductShortDescriptionProps = ProductShortDescriptionFragment & UseStyles<typeof useStyles>
20
+
21
+ export default function ProductShortDescription(props: ProductShortDescriptionProps) {
22
+ const { short_description } = props
23
+ const classes = useStyles(props)
24
+
25
+ return (
26
+ <Typography
27
+ variant='body1'
28
+ component='div'
29
+ classes={{ root: classes.root }}
30
+ dangerouslySetInnerHTML={{ __html: short_description?.html ?? '' }}
31
+ />
32
+ )
33
+ }
@@ -44,4 +44,7 @@ export { default as ProductPageMeta } from './ProductPageMeta'
44
44
  export { getProductStaticPaths } from './ProductStaticPaths/getProductStaticPaths'
45
45
  export { default as ProductWeight } from './ProductWeight'
46
46
 
47
+ export { default as ProductShortDescription } from './ProductShortDescription'
48
+ export * from './ProductShortDescription/ProductShortDescription.gql'
49
+
47
50
  export * from './ProductUpsells/UpsellProducts.gql'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-product",
3
- "version": "3.0.22",
3
+ "version": "3.0.23",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -24,9 +24,9 @@
24
24
  "@graphcommerce/framer-scroller": "^0.2.9",
25
25
  "@graphcommerce/graphql": "^2.103.5",
26
26
  "@graphcommerce/image": "^2.104.8",
27
- "@graphcommerce/magento-cart": "^3.1.7",
28
- "@graphcommerce/magento-store": "^3.0.18",
29
- "@graphcommerce/next-ui": "^3.2.2",
27
+ "@graphcommerce/magento-cart": "^3.1.8",
28
+ "@graphcommerce/magento-store": "^3.0.19",
29
+ "@graphcommerce/next-ui": "^3.2.3",
30
30
  "@graphql-typed-document-node/core": "^3.1.0",
31
31
  "@material-ui/core": "^4.12.3",
32
32
  "@material-ui/lab": "^4.0.0-alpha.60",
@@ -38,5 +38,5 @@
38
38
  "schema-dts": "^1.0.0",
39
39
  "type-fest": "^2.3.4"
40
40
  },
41
- "gitHead": "be6fb6e501c76d846b06935bf61e949f82f0c50f"
41
+ "gitHead": "23efb6abb9e5bb287434d07dbba664511b2c5e36"
42
42
  }