@graphcommerce/magento-customer 3.0.24 → 3.1.2
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 +12 -0
- package/components/CustomerFab/index.tsx +5 -10
- package/package.json +4 -4
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.1.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer@3.0.25...@graphcommerce/magento-customer@3.1.0) (2021-10-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **CustomerFab:** allow custom styling ([da38425](https://github.com/ho-nl/m2-pwa/commit/da384252b5e6e1025e0e90d683f7c60691366fb5))
|
|
12
|
+
* **CustomerFab:** allow full customization instead of just styling ([b9f4248](https://github.com/ho-nl/m2-pwa/commit/b9f42483c157b56f7406bf51b74557278c64a597))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [3.0.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-customer@3.0.8...@graphcommerce/magento-customer@3.0.9) (2021-09-30)
|
|
7
19
|
|
|
8
20
|
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { useQuery } from '@apollo/client'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
StyledBadge,
|
|
5
|
-
SvgImage,
|
|
6
|
-
SvgImageSimple,
|
|
7
|
-
UseStyles,
|
|
8
|
-
} from '@graphcommerce/next-ui'
|
|
9
|
-
import { Fab, makeStyles, NoSsr, Theme } from '@material-ui/core'
|
|
2
|
+
import { iconPersonAlt, StyledBadge, SvgImageSimple, UseStyles } from '@graphcommerce/next-ui'
|
|
3
|
+
import { Fab, FabProps as FabPropsType, makeStyles, NoSsr, Theme } from '@material-ui/core'
|
|
10
4
|
import PageLink from 'next/link'
|
|
11
5
|
import React from 'react'
|
|
12
6
|
import { CustomerTokenDocument, CustomerTokenQuery } from '../../hooks'
|
|
@@ -21,16 +15,17 @@ type CustomerFabContentProps = CustomerTokenQuery & {
|
|
|
21
15
|
icon?: React.ReactNode
|
|
22
16
|
authHref: string
|
|
23
17
|
guestHref: string
|
|
18
|
+
FabProps?: Omit<FabPropsType, 'children'>
|
|
24
19
|
} & UseStyles<typeof useStyles>
|
|
25
20
|
|
|
26
21
|
function CustomerFabContent(props: CustomerFabContentProps) {
|
|
27
|
-
const { customerToken, icon, guestHref, authHref } = props
|
|
22
|
+
const { customerToken, icon, guestHref, authHref, FabProps } = props
|
|
28
23
|
const classes = useStyles(props)
|
|
29
24
|
const requireAuth = Boolean(!customerToken || !customerToken.valid)
|
|
30
25
|
|
|
31
26
|
return (
|
|
32
27
|
<PageLink href={requireAuth ? guestHref : authHref} passHref>
|
|
33
|
-
<Fab style={{ boxShadow: 'none' }} aria-label='Open Menu' size='large'>
|
|
28
|
+
<Fab style={{ boxShadow: 'none' }} aria-label='Open Menu' size='large' {...FabProps}>
|
|
34
29
|
<StyledBadge
|
|
35
30
|
badgeContent={customerToken?.token ? 1 : 0}
|
|
36
31
|
color={customerToken?.valid ? 'primary' : 'error'}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/magento-customer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
6
|
"browserslist": [
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@graphcommerce/graphql": "^2.103.7",
|
|
25
25
|
"@graphcommerce/image": "^2.104.10",
|
|
26
26
|
"@graphcommerce/magento-graphql": "^2.103.7",
|
|
27
|
-
"@graphcommerce/magento-store": "^3.0.
|
|
28
|
-
"@graphcommerce/next-ui": "^3.
|
|
27
|
+
"@graphcommerce/magento-store": "^3.0.26",
|
|
28
|
+
"@graphcommerce/next-ui": "^3.6.0",
|
|
29
29
|
"@graphcommerce/react-hook-form": "^2.102.8",
|
|
30
30
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
31
31
|
"@material-ui/core": "^4.12.3",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"react": "^17.0.2",
|
|
37
37
|
"react-dom": "^17.0.2"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "beb4b83268176f7c6579cee2fe844752315e2378"
|
|
40
40
|
}
|