@graphcommerce/next-ui 4.1.3 → 4.1.4
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,5 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1287](https://github.com/ho-nl/m2-pwa/pull/1287)
|
|
8
|
+
[`d17f97d3a`](https://github.com/ho-nl/m2-pwa/commit/d17f97d3a786c33a99a10e4e949251c52fdbbdac)
|
|
9
|
+
Thanks [@paales](https://github.com/paales)! - Allow passing sx prop to SidebarGallery and
|
|
10
|
+
ContentLinks
|
|
11
|
+
|
|
3
12
|
## 4.1.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ScrollerProvider,
|
|
9
9
|
} from '@graphcommerce/framer-scroller'
|
|
10
10
|
import { clientSize, useMotionValueValue } from '@graphcommerce/framer-utils'
|
|
11
|
-
import { Fab, useTheme, alpha, Box, styled } from '@mui/material'
|
|
11
|
+
import { Fab, useTheme, alpha, Box, styled, SxProps, Theme } from '@mui/material'
|
|
12
12
|
import { m, useDomEvent, useMotionValue } from 'framer-motion'
|
|
13
13
|
import { useRouter } from 'next/router'
|
|
14
14
|
import React, { useEffect, useRef } from 'react'
|
|
@@ -47,10 +47,17 @@ export type SidebarGalleryProps = {
|
|
|
47
47
|
images: MotionImageAspectProps[]
|
|
48
48
|
aspectRatio?: [number, number]
|
|
49
49
|
routeHash?: string
|
|
50
|
+
sx?: SxProps<Theme>
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
export function SidebarGallery(props: SidebarGalleryProps) {
|
|
53
|
-
const {
|
|
54
|
+
const {
|
|
55
|
+
sidebar,
|
|
56
|
+
images,
|
|
57
|
+
aspectRatio: [width, height] = [1, 1],
|
|
58
|
+
sx,
|
|
59
|
+
routeHash = 'gallery',
|
|
60
|
+
} = props
|
|
54
61
|
|
|
55
62
|
const router = useRouter()
|
|
56
63
|
const prevRoute = usePrevPageRouter()
|
|
@@ -109,7 +116,7 @@ export function SidebarGallery(props: SidebarGalleryProps) {
|
|
|
109
116
|
|
|
110
117
|
return (
|
|
111
118
|
<ScrollerProvider scrollSnapAlign='center'>
|
|
112
|
-
<Row maxWidth={false} disableGutters className={classes.row}>
|
|
119
|
+
<Row maxWidth={false} disableGutters className={classes.row} sx={sx}>
|
|
113
120
|
<MotionBox
|
|
114
121
|
layout
|
|
115
122
|
className={classes.root}
|
|
@@ -13,7 +13,7 @@ const ButtonItem = styled(Button)(({ theme }) => ({
|
|
|
13
13
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
14
14
|
borderRadius: 0,
|
|
15
15
|
justifyContent: 'space-between',
|
|
16
|
-
|
|
16
|
+
typography: 'body1',
|
|
17
17
|
}))
|
|
18
18
|
|
|
19
19
|
export function ButtonLinkListItem(props: ButtonLinkProps) {
|
|
@@ -14,13 +14,18 @@ const parts = ['root', 'scroller', 'title'] as const
|
|
|
14
14
|
const { classes } = extendableComponent(compName, parts)
|
|
15
15
|
|
|
16
16
|
export function ContentLinks(props: ContentLinksProps) {
|
|
17
|
-
const { title, children } = props
|
|
17
|
+
const { title, children, sx = [] } = props
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<Container
|
|
21
21
|
className={classes.root}
|
|
22
22
|
maxWidth={false}
|
|
23
|
-
sx={
|
|
23
|
+
sx={[
|
|
24
|
+
(theme) => ({
|
|
25
|
+
marginBottom: `${theme.spacings.md}`,
|
|
26
|
+
}),
|
|
27
|
+
...(Array.isArray(sx) ? sx : [sx]),
|
|
28
|
+
]}
|
|
24
29
|
>
|
|
25
30
|
<ScrollerProvider scrollSnapAlign='none'>
|
|
26
31
|
<Scroller
|
package/package.json
CHANGED