@graphcommerce/next-ui 3.20.8 → 3.20.9
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 +11 -0
- package/FramerScroller/components/SidebarGallery.tsx +1 -2
- package/Row/ButtonLinkList/{index.tsx → ButtonLinkList.tsx} +4 -4
- package/{ButtonLink/index.tsx → Row/ButtonLinkList/ButtonLinkListItem.tsx} +10 -9
- package/Row/ButtonLinkList/index.ts +2 -0
- package/index.ts +1 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.20.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.8...@graphcommerce/next-ui@3.20.9) (2021-12-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* simplify ButtonLinkList and made more flexible ([e01cc82](https://github.com/ho-nl/m2-pwa/commit/e01cc825b87abf81d1cb8f9dc976f674b9e8e6d3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.20.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.7...@graphcommerce/next-ui@3.20.8) (2021-12-15)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -11,12 +11,11 @@ import {
|
|
|
11
11
|
} from '@graphcommerce/framer-scroller'
|
|
12
12
|
import { clientSize, useMotionValueValue } from '@graphcommerce/framer-utils'
|
|
13
13
|
import { Fab, makeStyles, Theme, useTheme, alpha } from '@material-ui/core'
|
|
14
|
-
import clsx from 'clsx'
|
|
15
14
|
import { m, useDomEvent, useMotionValue } from 'framer-motion'
|
|
16
15
|
import React, { useEffect, useRef } from 'react'
|
|
17
|
-
import { classesPicker } from '../..'
|
|
18
16
|
import Row from '../../Row'
|
|
19
17
|
import { UseStyles } from '../../Styles'
|
|
18
|
+
import { classesPicker } from '../../Styles/classesPicker'
|
|
20
19
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
21
20
|
import SvgImageSimple from '../../SvgImage/SvgImageSimple'
|
|
22
21
|
import { iconChevronLeft, iconChevronRight, iconFullscreen, iconFullscreenExit } from '../../icons'
|
|
@@ -32,20 +32,20 @@ const useStyles = makeStyles(
|
|
|
32
32
|
|
|
33
33
|
type ButtonLinkListPropsBase = {
|
|
34
34
|
title: string
|
|
35
|
-
|
|
35
|
+
children: React.ReactNode
|
|
36
36
|
containsBigLinks: boolean
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export type ButtonLinkListProps = UseStyles<typeof useStyles> & ButtonLinkListPropsBase
|
|
40
40
|
|
|
41
|
-
export
|
|
42
|
-
const { title,
|
|
41
|
+
export function ButtonLinkList(props: ButtonLinkListProps) {
|
|
42
|
+
const { title, children } = props
|
|
43
43
|
const classes = useStyles(props)
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<Row maxWidth='md' className={classes.container}>
|
|
47
47
|
<SectionContainer labelLeft={title}>
|
|
48
|
-
<div className={classes.links}>{
|
|
48
|
+
<div className={classes.links}>{children}</div>
|
|
49
49
|
</SectionContainer>
|
|
50
50
|
</Row>
|
|
51
51
|
)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { makeStyles, Theme } from '@material-ui/core'
|
|
2
|
+
import clsx from 'clsx'
|
|
2
3
|
import PageLink from 'next/link'
|
|
3
4
|
import React from 'react'
|
|
4
|
-
import Button, { ButtonProps } from '
|
|
5
|
-
import { UseStyles } from '
|
|
6
|
-
import SvgImageSimple from '
|
|
7
|
-
import { iconChevronRight } from '
|
|
5
|
+
import Button, { ButtonProps } from '../../Button'
|
|
6
|
+
import { UseStyles } from '../../Styles'
|
|
7
|
+
import SvgImageSimple from '../../SvgImage/SvgImageSimple'
|
|
8
|
+
import { iconChevronRight } from '../../icons'
|
|
8
9
|
|
|
9
10
|
const useStyles = makeStyles((theme: Theme) => ({
|
|
10
11
|
buttonLink: {
|
|
@@ -24,20 +25,20 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|
|
24
25
|
}))
|
|
25
26
|
|
|
26
27
|
export type ButtonLinkProps = {
|
|
27
|
-
|
|
28
|
+
children: React.ReactNode
|
|
28
29
|
url: string
|
|
29
30
|
endIcon?: React.ReactNode
|
|
30
31
|
} & ButtonProps &
|
|
31
32
|
UseStyles<typeof useStyles>
|
|
32
33
|
|
|
33
|
-
export
|
|
34
|
-
const {
|
|
34
|
+
export function ButtonLinkListItem(props: ButtonLinkProps) {
|
|
35
|
+
const { children, url, endIcon, className, ...buttonProps } = props
|
|
35
36
|
const classes = useStyles(props)
|
|
36
37
|
|
|
37
38
|
return (
|
|
38
39
|
<PageLink href={url} passHref>
|
|
39
|
-
<Button {...buttonProps} className={classes.buttonLink}>
|
|
40
|
-
<span>{
|
|
40
|
+
<Button {...buttonProps} className={clsx(classes.buttonLink, className)}>
|
|
41
|
+
<span>{children}</span>
|
|
41
42
|
{endIcon ?? <SvgImageSimple src={iconChevronRight} />}
|
|
42
43
|
</Button>
|
|
43
44
|
</PageLink>
|
package/index.ts
CHANGED
|
@@ -27,8 +27,7 @@ export * from './Blog/BlogListItem'
|
|
|
27
27
|
export { default as BlogListItem } from './Blog/BlogListItem'
|
|
28
28
|
export * from './Button'
|
|
29
29
|
export { default as Button } from './Button'
|
|
30
|
-
|
|
31
|
-
export { default as ButtonLink } from './ButtonLink'
|
|
30
|
+
|
|
32
31
|
export * from './ChipMenu'
|
|
33
32
|
export { default as ChipMenu } from './ChipMenu'
|
|
34
33
|
export * from './ContainerWithHeader'
|
|
@@ -66,7 +65,6 @@ export * from './RenderType'
|
|
|
66
65
|
export { default as RenderType } from './RenderType'
|
|
67
66
|
export { default as Row } from './Row'
|
|
68
67
|
export * from './Row/ButtonLinkList'
|
|
69
|
-
export { default as ButtonLinkList } from './Row/ButtonLinkList'
|
|
70
68
|
export { default as ColumnOne } from './Row/ColumnOne'
|
|
71
69
|
export { default as ColumnOneBoxed } from './Row/ColumnOneBoxed'
|
|
72
70
|
export { default as ColumnOneCentered } from './Row/ColumnOneCentered'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.9",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.5.6",
|
|
13
13
|
"@graphcommerce/framer-next-pages": "^2.108.3",
|
|
14
|
-
"@graphcommerce/framer-scroller": "^1.1.
|
|
14
|
+
"@graphcommerce/framer-scroller": "^1.1.9",
|
|
15
15
|
"@graphcommerce/framer-utils": "^2.103.19",
|
|
16
16
|
"@graphcommerce/graphql": "^2.105.8",
|
|
17
17
|
"@graphcommerce/image": "^2.105.8",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"project": "./tsconfig.json"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "874fc99dcc129872cd7577482ab26c5ea256a7fb"
|
|
56
56
|
}
|