@graphcommerce/next-ui 3.2.3 → 3.3.0
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/AppShell/DesktopNavBar.tsx +7 -5
- package/CHANGELOG.md +13 -0
- package/package.json +2 -3
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller'
|
|
2
|
-
import { Link, makeStyles, Theme } from '@material-ui/core'
|
|
2
|
+
import { Link, LinkProps as MuiLinkProps, makeStyles, Theme } from '@material-ui/core'
|
|
3
|
+
import { Variant as ThemeVariant } from '@material-ui/core/styles/createTypography'
|
|
3
4
|
import clsx from 'clsx'
|
|
4
5
|
import { m } from 'framer-motion'
|
|
5
6
|
import PageLink from 'next/link'
|
|
6
7
|
import { useRouter } from 'next/router'
|
|
7
8
|
import React from 'react'
|
|
9
|
+
import { UseStyles } from '../Styles'
|
|
8
10
|
import SvgImageSimple from '../SvgImage/SvgImageSimple'
|
|
9
11
|
import { iconChevronLeft, iconChevronRight } from '../icons'
|
|
10
12
|
import { MenuProps } from './Menu'
|
|
@@ -79,11 +81,11 @@ const useStyles = makeStyles(
|
|
|
79
81
|
{ name: 'DesktopNavBar' },
|
|
80
82
|
)
|
|
81
83
|
|
|
82
|
-
export type MenuTabsProps = MenuProps
|
|
84
|
+
export type MenuTabsProps = MenuProps & UseStyles<typeof useStyles> & { LinkProps?: MuiLinkProps }
|
|
83
85
|
|
|
84
86
|
export default function DesktopNavBar(props: MenuTabsProps) {
|
|
85
|
-
const { menu } = props
|
|
86
|
-
const classes = useStyles()
|
|
87
|
+
const { menu, LinkProps } = props
|
|
88
|
+
const classes = useStyles(props)
|
|
87
89
|
const router = useRouter()
|
|
88
90
|
|
|
89
91
|
return (
|
|
@@ -92,7 +94,7 @@ export default function DesktopNavBar(props: MenuTabsProps) {
|
|
|
92
94
|
<Scroller className={classes.scroller} hideScrollbar>
|
|
93
95
|
{menu.map(({ href, children, ...linkProps }) => (
|
|
94
96
|
<PageLink key={href.toString()} href={href} {...linkProps} passHref>
|
|
95
|
-
<Link className={classes.link}
|
|
97
|
+
<Link {...LinkProps} className={clsx(classes.link, LinkProps?.className)}>
|
|
96
98
|
{children}
|
|
97
99
|
<div
|
|
98
100
|
className={clsx(
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.3.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.3...@graphcommerce/next-ui@3.3.0) (2021-10-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* allow styling DesktopNavBar ([12f99a6](https://github.com/ho-nl/m2-pwa/commit/12f99a603d9e9f89e28ec2452823b58abee59c4c))
|
|
12
|
+
* implement extensibility for DesktopNavBar, SearchButton ([5710de8](https://github.com/ho-nl/m2-pwa/commit/5710de8936f59c7d0fcc648978183f0e7fdd26b7))
|
|
13
|
+
* make DesktopNavBar Link variant customizable ([d47172f](https://github.com/ho-nl/m2-pwa/commit/d47172f3ebe0cc0b769e0d17c171ae4bb2045bbb))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [3.2.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.2...@graphcommerce/next-ui@3.2.3) (2021-10-11)
|
|
7
20
|
|
|
8
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -54,6 +54,5 @@
|
|
|
54
54
|
"parserOptions": {
|
|
55
55
|
"project": "./tsconfig.json"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
58
|
-
"gitHead": "23efb6abb9e5bb287434d07dbba664511b2c5e36"
|
|
57
|
+
}
|
|
59
58
|
}
|