@graphcommerce/magento-cart-email 2.107.42 → 3.0.1

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
@@ -1,114 +1,144 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
8
+ Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
9
+ so that the packages link to back to the website and repository
10
+ - Updated dependencies
11
+ [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
12
+ - @graphcommerce/graphql@3.0.1
13
+ - @graphcommerce/image@3.0.1
14
+ - @graphcommerce/magento-cart@4.0.1
15
+ - @graphcommerce/magento-customer@4.0.1
16
+ - @graphcommerce/magento-product@4.0.1
17
+ - @graphcommerce/magento-store@4.0.1
18
+ - @graphcommerce/next-ui@4.0.1
19
+ - @graphcommerce/react-hook-form@3.0.1
20
+
21
+ ## 3.0.0
22
+
23
+ ### Major Changes
24
+
25
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
26
+ [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
27
+ Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+ [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
33
+ - @graphcommerce/graphql@3.0.0
34
+ - @graphcommerce/image@3.0.0
35
+ - @graphcommerce/magento-cart@4.0.0
36
+ - @graphcommerce/magento-customer@4.0.0
37
+ - @graphcommerce/magento-product@4.0.0
38
+ - @graphcommerce/magento-store@4.0.0
39
+ - @graphcommerce/next-ui@4.0.0
40
+ - @graphcommerce/react-hook-form@3.0.0
5
41
 
6
- # [2.107.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.106.4...@graphcommerce/magento-cart-email@2.107.0) (2021-12-01)
42
+ All notable changes to this project will be documented in this file. See
43
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
44
 
45
+ # [2.107.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.106.4...@graphcommerce/magento-cart-email@2.107.0) (2021-12-01)
8
46
 
9
47
  ### Features
10
48
 
11
- * add title to login form ([563157b](https://github.com/ho-nl/m2-pwa/commit/563157bc7059d0b10d8e93c71b918b816ca45943))
12
-
13
-
14
-
15
-
49
+ - add title to login form
50
+ ([563157b](https://github.com/ho-nl/m2-pwa/commit/563157bc7059d0b10d8e93c71b918b816ca45943))
16
51
 
17
52
  # [2.106.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.105.31...@graphcommerce/magento-cart-email@2.106.0) (2021-11-12)
18
53
 
19
-
20
54
  ### Bug Fixes
21
55
 
22
- * even more translations ([1a1f988](https://github.com/ho-nl/m2-pwa/commit/1a1f98837c704b978f6b42b619d9c52f540b2d48))
23
-
56
+ - even more translations
57
+ ([1a1f988](https://github.com/ho-nl/m2-pwa/commit/1a1f98837c704b978f6b42b619d9c52f540b2d48))
24
58
 
25
59
  ### Features
26
60
 
27
- * added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
28
-
29
-
30
-
31
-
61
+ - added tons of translations
62
+ ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
32
63
 
33
64
  ## [2.105.30](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.105.29...@graphcommerce/magento-cart-email@2.105.30) (2021-11-12)
34
65
 
35
-
36
66
  ### Bug Fixes
37
67
 
38
- * always show customer login form explanation ([ef51662](https://github.com/ho-nl/m2-pwa/commit/ef51662b91ad1d3851cfcc75925f8f81b214f348))
39
-
40
-
41
-
42
-
68
+ - always show customer login form explanation
69
+ ([ef51662](https://github.com/ho-nl/m2-pwa/commit/ef51662b91ad1d3851cfcc75925f8f81b214f348))
43
70
 
44
71
  ## [2.105.29](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.105.28...@graphcommerce/magento-cart-email@2.105.29) (2021-11-12)
45
72
 
46
-
47
73
  ### Bug Fixes
48
74
 
49
- * **checkout-email-form:** spacing too large ([f54e217](https://github.com/ho-nl/m2-pwa/commit/f54e2170b5c47c1c33e74db45e3bcae3d3523c4e))
50
-
51
-
52
-
53
-
75
+ - **checkout-email-form:** spacing too large
76
+ ([f54e217](https://github.com/ho-nl/m2-pwa/commit/f54e2170b5c47c1c33e74db45e3bcae3d3523c4e))
54
77
 
55
78
  # [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.104.37...@graphcommerce/magento-cart-email@2.105.0) (2021-10-27)
56
79
 
57
-
58
80
  ### Features
59
81
 
60
- * **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
61
-
62
-
63
-
64
-
82
+ - **nextjs:** upgraded to nextjs 12
83
+ ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
65
84
 
66
85
  ## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.104.0...@graphcommerce/magento-cart-email@2.104.1) (2021-09-27)
67
86
 
68
87
  **Note:** Version bump only for package @graphcommerce/magento-cart-email
69
88
 
70
-
71
-
72
-
73
-
74
89
  # 2.104.0 (2021-09-27)
75
90
 
76
-
77
91
  ### Bug Fixes
78
92
 
79
- * adjust imports to correct ones ([c6e3092](https://github.com/ho-nl/m2-pwa/commit/c6e3092569d1c49fe138b3810704da8e04acbbe2))
80
- * email field not filled in checkout ([910caca](https://github.com/ho-nl/m2-pwa/commit/910cacaa49fc5fef2ee4066df828c5a6dd4a2700))
81
- * ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
82
- * implement next-ui barrel imports ([75bea70](https://github.com/ho-nl/m2-pwa/commit/75bea703dba898f18a2a1dfa3243ebd0a4e6f0e1))
83
- * make sure ComposedForm actually submits correctly ([c6499d9](https://github.com/ho-nl/m2-pwa/commit/c6499d9d36f874cd65b310cbf7f63f5a88fa86cd))
84
- * make sure the session token gets deactivated when trying to merge carts when it cant ([2a9416b](https://github.com/ho-nl/m2-pwa/commit/2a9416b5c9efcd28a27f4183922ab419f62ea767))
85
- * ref couldn't be forwarded for ShippingAddressForm ([1f90f1a](https://github.com/ho-nl/m2-pwa/commit/1f90f1a30437d656fcf841026ad13bb2b45d831b))
86
- * rename NextButton to Button, change imports ([976adb0](https://github.com/ho-nl/m2-pwa/commit/976adb0bf906310d1efce888dcc9be1e28ce0f1b))
87
-
93
+ - adjust imports to correct ones
94
+ ([c6e3092](https://github.com/ho-nl/m2-pwa/commit/c6e3092569d1c49fe138b3810704da8e04acbbe2))
95
+ - email field not filled in checkout
96
+ ([910caca](https://github.com/ho-nl/m2-pwa/commit/910cacaa49fc5fef2ee4066df828c5a6dd4a2700))
97
+ - ignore md files from triggering version updates
98
+ ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
99
+ - implement next-ui barrel imports
100
+ ([75bea70](https://github.com/ho-nl/m2-pwa/commit/75bea703dba898f18a2a1dfa3243ebd0a4e6f0e1))
101
+ - make sure ComposedForm actually submits correctly
102
+ ([c6499d9](https://github.com/ho-nl/m2-pwa/commit/c6499d9d36f874cd65b310cbf7f63f5a88fa86cd))
103
+ - make sure the session token gets deactivated when trying to merge carts when it cant
104
+ ([2a9416b](https://github.com/ho-nl/m2-pwa/commit/2a9416b5c9efcd28a27f4183922ab419f62ea767))
105
+ - ref couldn't be forwarded for ShippingAddressForm
106
+ ([1f90f1a](https://github.com/ho-nl/m2-pwa/commit/1f90f1a30437d656fcf841026ad13bb2b45d831b))
107
+ - rename NextButton to Button, change imports
108
+ ([976adb0](https://github.com/ho-nl/m2-pwa/commit/976adb0bf906310d1efce888dcc9be1e28ce0f1b))
88
109
 
89
110
  ### Features
90
111
 
91
- * add barrel file for magento-customer ([02fb7f0](https://github.com/ho-nl/m2-pwa/commit/02fb7f004de968ee968b00e364b2b370f4f7d4f1))
92
- * **cart:** merge customer and guest carts when logging in ([25ebc0f](https://github.com/ho-nl/m2-pwa/commit/25ebc0f4e825f8512e2c3f1e01bf23a2d019b0d3))
93
- * **cart:** when a cart is not active anymore show a clear cart button ([5d04a14](https://github.com/ho-nl/m2-pwa/commit/5d04a14726c040b20b34c0b88f923aee1dff22e5))
94
- * **graphql:** introduced new graphql package that holds all generated files ([a3e7aa0](https://github.com/ho-nl/m2-pwa/commit/a3e7aa05540540533b5ced9a95f1f802ecbe499f))
95
- * **image:** introduced completely rewritten Image component ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
96
- * **inline-account:** re-added the component ([c508d34](https://github.com/ho-nl/m2-pwa/commit/c508d341ca34daa26a6db13ead72f7f4bdc72160))
97
- * next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
98
- * **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
99
- * renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
100
- * submit composed form sequentially ([890d839](https://github.com/ho-nl/m2-pwa/commit/890d8393d635c3777aa17cfa8d4dafc13c2e6cdc))
101
- * upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
102
- * useFormMutationCart and simpler imports ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
103
-
112
+ - add barrel file for magento-customer
113
+ ([02fb7f0](https://github.com/ho-nl/m2-pwa/commit/02fb7f004de968ee968b00e364b2b370f4f7d4f1))
114
+ - **cart:** merge customer and guest carts when logging in
115
+ ([25ebc0f](https://github.com/ho-nl/m2-pwa/commit/25ebc0f4e825f8512e2c3f1e01bf23a2d019b0d3))
116
+ - **cart:** when a cart is not active anymore show a clear cart button
117
+ ([5d04a14](https://github.com/ho-nl/m2-pwa/commit/5d04a14726c040b20b34c0b88f923aee1dff22e5))
118
+ - **graphql:** introduced new graphql package that holds all generated files
119
+ ([a3e7aa0](https://github.com/ho-nl/m2-pwa/commit/a3e7aa05540540533b5ced9a95f1f802ecbe499f))
120
+ - **image:** introduced completely rewritten Image component
121
+ ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
122
+ - **inline-account:** re-added the component
123
+ ([c508d34](https://github.com/ho-nl/m2-pwa/commit/c508d341ca34daa26a6db13ead72f7f4bdc72160))
124
+ - next.js 11
125
+ ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
126
+ - **playwright:** added new playwright package to enable browser testing
127
+ ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
128
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
129
+ [@reachdigital](https://github.com/reachdigital)
130
+ ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
131
+ - submit composed form sequentially
132
+ ([890d839](https://github.com/ho-nl/m2-pwa/commit/890d8393d635c3777aa17cfa8d4dafc13c2e6cdc))
133
+ - upgraded to nextjs 11
134
+ ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
135
+ - useFormMutationCart and simpler imports
136
+ ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
104
137
 
105
138
  ### Reverts
106
139
 
107
- * Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
108
-
109
-
110
-
111
-
140
+ - Revert "chore: upgrade @apollo/client"
141
+ ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
112
142
 
113
143
  # Change Log
114
144
 
@@ -126,8 +156,7 @@ All notable changes to this project will be documented in this file. See
126
156
 
127
157
  ### Bug Fixes
128
158
 
129
- - make sure the session token gets deactivated when trying to merge carts when
130
- it cant
159
+ - make sure the session token gets deactivated when trying to merge carts when it cant
131
160
  ([2a9416b](https://github.com/ho-nl/m2-pwa/commit/2a9416b5c9efcd28a27f4183922ab419f62ea767))
132
161
 
133
162
  ## [2.102.5](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-email@2.102.4...@graphcommerce/magento-cart-email@2.102.5) (2021-08-13)
@@ -1,4 +1,4 @@
1
- import { useMutation } from '@apollo/client'
1
+ import { useMutation } from '@graphcommerce/graphql'
2
2
  import {
3
3
  ApolloCartErrorAlert,
4
4
  useCartQuery,
@@ -9,35 +9,34 @@ import {
9
9
  SignUpFormInline,
10
10
  useFormIsEmailAvailable,
11
11
  } from '@graphcommerce/magento-customer'
12
- import { AnimatedRow, Button, FormDiv, FormRow } from '@graphcommerce/next-ui'
12
+ import { AnimatedRow, extendableComponent, FormDiv, FormRow } from '@graphcommerce/next-ui'
13
13
  import { emailPattern, useFormCompose, UseFormComposeOptions } from '@graphcommerce/react-hook-form'
14
14
  import { Trans } from '@lingui/macro'
15
- import { CircularProgress, makeStyles, TextField, Typography } from '@material-ui/core'
16
- import { Alert } from '@material-ui/lab'
15
+ import {
16
+ CircularProgress,
17
+ TextField,
18
+ Typography,
19
+ Alert,
20
+ Button,
21
+ SxProps,
22
+ Theme,
23
+ } from '@mui/material'
17
24
  import { AnimatePresence } from 'framer-motion'
18
25
  import React, { useEffect, useState } from 'react'
19
- import EmailHelperList from '../EmailHelperList'
20
26
  import { CartEmailDocument } from './CartEmail.gql'
21
27
  import { SetGuestEmailOnCartDocument } from './SetGuestEmailOnCart.gql'
22
28
 
23
- const useStyles = makeStyles(
24
- () => ({
25
- helperList: {
26
- marginBottom: 0,
27
- },
28
- formRow: {
29
- paddingTop: 0,
30
- paddingBottom: 0,
31
- },
32
- }),
33
- { name: 'EmailForm' },
34
- )
35
-
36
- export type EmailFormProps = Pick<UseFormComposeOptions, 'step'>
29
+ export type EmailFormProps = Pick<UseFormComposeOptions, 'step'> & {
30
+ children?: React.ReactNode
31
+ sx?: SxProps<Theme>
32
+ }
33
+
34
+ const name = 'EmailForm' as const
35
+ const parts = ['root', 'formRow'] as const
36
+ const { classes } = extendableComponent(name, parts)
37
37
 
38
38
  export default function EmailForm(props: EmailFormProps) {
39
- const { step } = props
40
- const classes = useStyles()
39
+ const { step, children, sx } = props
41
40
  const [expand, setExpand] = useState(false)
42
41
 
43
42
  useMergeCustomerCart()
@@ -82,16 +81,16 @@ export default function EmailForm(props: EmailFormProps) {
82
81
  if (formState.isSubmitting) endAdornment = <CircularProgress />
83
82
 
84
83
  return (
85
- <FormDiv contained>
84
+ <FormDiv contained background='default' className={classes.root} sx={sx}>
86
85
  <AnimatePresence initial={false}>
87
86
  <AnimatedRow key='emailform'>
88
87
  <form noValidate onSubmit={submit}>
89
88
  <FormRow>
90
- <Typography variant='h5' gutterBottom>
89
+ <Typography variant='h5' component='h2' gutterBottom>
91
90
  <Trans>Login or create an account</Trans>
92
91
  </Typography>
93
92
  </FormRow>
94
- <FormRow className={classes.formRow}>
93
+ <FormRow className={classes.formRow} sx={{ py: 0 }}>
95
94
  <TextField
96
95
  variant='outlined'
97
96
  type='email'
@@ -124,13 +123,9 @@ export default function EmailForm(props: EmailFormProps) {
124
123
 
125
124
  {mode === 'signup' && expand && (
126
125
  <AnimatedRow key='inline-signup'>
127
- <SignUpFormInline
128
- helperList={
129
- <EmailHelperList key='signup-helper-list' classes={{ root: classes.helperList }} />
130
- }
131
- key='signup-form-inline'
132
- email={watch('email')}
133
- />
126
+ <SignUpFormInline key='signup-form-inline' email={watch('email')}>
127
+ {children}
128
+ </SignUpFormInline>
134
129
  </AnimatedRow>
135
130
  )}
136
131
 
@@ -141,10 +136,8 @@ export default function EmailForm(props: EmailFormProps) {
141
136
  </Alert>
142
137
  </FormRow>
143
138
  )}
144
- {mode !== 'session-expired' && ((mode !== 'signup' && expand) || !expand) && (
145
- <AnimatedRow key='email-helperlist'>
146
- <EmailHelperList />
147
- </AnimatedRow>
139
+ {children && mode !== 'session-expired' && ((mode !== 'signup' && expand) || !expand) && (
140
+ <AnimatedRow key='email-helperlist'>{children}</AnimatedRow>
148
141
  )}
149
142
  </AnimatePresence>
150
143
  </FormDiv>
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart-email",
3
- "version": "2.107.42",
3
+ "homepage": "https://www.graphcommerce.org/",
4
+ "repository": "github:graphcommerce-org/graphcommerce",
5
+ "version": "3.0.1",
4
6
  "sideEffects": false,
5
7
  "prettier": "@graphcommerce/prettier-config-pwa",
6
- "browserslist": [
7
- "extends @graphcommerce/browserslist-config-pwa"
8
- ],
9
8
  "eslintConfig": {
10
9
  "extends": "@graphcommerce/eslint-config-pwa",
11
10
  "parserOptions": {
@@ -13,30 +12,25 @@
13
12
  }
14
13
  },
15
14
  "devDependencies": {
16
- "@graphcommerce/browserslist-config-pwa": "^3.0.3",
17
- "@graphcommerce/eslint-config-pwa": "^3.1.10",
18
- "@graphcommerce/prettier-config-pwa": "^3.0.5",
19
- "@graphcommerce/typescript-config-pwa": "^3.1.2",
20
- "@playwright/test": "^1.17.1"
15
+ "@graphcommerce/eslint-config-pwa": "^4.0.1",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.1",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.1",
18
+ "@playwright/test": "^1.18.1"
21
19
  },
22
20
  "dependencies": {
23
- "@apollo/client": "^3.5.6",
24
- "@graphcommerce/graphql": "^2.105.13",
25
- "@graphcommerce/image": "^2.105.13",
26
- "@graphcommerce/magento-cart": "^3.10.2",
27
- "@graphcommerce/magento-customer": "^3.6.43",
28
- "@graphcommerce/magento-product": "^3.8.12",
29
- "@graphcommerce/magento-store": "^3.4.11",
30
- "@graphcommerce/next-ui": "^3.25.2",
31
- "@graphcommerce/react-hook-form": "^2.104.7",
32
- "@lingui/macro": "^3.13.0",
33
- "@material-ui/core": "^4.12.3",
34
- "@material-ui/lab": "^4.0.0-alpha.60",
35
- "clsx": "^1.1.1",
36
- "framer-motion": "^5.5.5",
37
- "next": "^12.0.7",
21
+ "@graphcommerce/graphql": "^3.0.1",
22
+ "@graphcommerce/image": "^3.0.1",
23
+ "@graphcommerce/magento-cart": "^4.0.1",
24
+ "@graphcommerce/magento-customer": "^4.0.1",
25
+ "@graphcommerce/magento-product": "^4.0.1",
26
+ "@graphcommerce/magento-store": "^4.0.1",
27
+ "@graphcommerce/next-ui": "^4.0.1",
28
+ "@graphcommerce/react-hook-form": "^3.0.1",
29
+ "@lingui/macro": "^3.13.2",
30
+ "@mui/material": "^5.4.1",
31
+ "framer-motion": "^6.2.4",
32
+ "next": "^12.0.10",
38
33
  "react": "^17.0.2",
39
34
  "react-dom": "^17.0.2"
40
- },
41
- "gitHead": "110ddb032ee3ce6e363b9f5f7d21af71fb51b527"
35
+ }
42
36
  }
@@ -1,34 +0,0 @@
1
- import { UseStyles } from '@graphcommerce/next-ui'
2
- import { Trans } from '@lingui/macro'
3
- import { makeStyles, Theme } from '@material-ui/core'
4
- import clsx from 'clsx'
5
-
6
- const useStyles = makeStyles(
7
- (theme: Theme) => ({
8
- root: {
9
- ...theme.typography.body2,
10
- paddingLeft: theme.spacings.xs,
11
- },
12
- }),
13
- { name: 'EmailHelperList' },
14
- )
15
-
16
- type HelperListProps = UseStyles<typeof useStyles>
17
-
18
- export default function EmailHelperList(props: HelperListProps) {
19
- const classes = useStyles(props)
20
-
21
- return (
22
- <ul className={clsx(classes.root)}>
23
- <li>
24
- <Trans>E-mail address of existing customers will be recognized, sign in is optional.</Trans>
25
- </li>
26
- <li>
27
- <Trans>Fill in password fields to create an account.</Trans>
28
- </li>
29
- <li>
30
- <Trans>Leave passwords fields empty to order as guest.</Trans>
31
- </li>
32
- </ul>
33
- )
34
- }