components uses css modules; other refactoring
This commit is contained in:
1 parent
0cd61e0ed9
commit
d65aba19a0
28 files changed
+137
-94
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import s from './styles.module.css'
|
||||
import cx from 'classnames'
|
||||
import { useRouter } from 'next/router'
|
||||
import { ActiveLink } from './ActiveLink'
|
||||
@@ -5,7 +6,6 @@ import { isPartOfPath } from 'src/lib/url'
|
||||
|
||||
export type MenuItemProps = {
|
||||
href: string
|
||||
layout: 'desktop' | 'mobile'
|
||||
}
|
||||
|
||||
export const MenuItem: React.FC<MenuItemProps> = props => {
|
||||
@@ -17,8 +17,8 @@ export const MenuItem: React.FC<MenuItemProps> = props => {
|
||||
|
||||
return (
|
||||
<li
|
||||
className={cx('menuItem', props.layout, {
|
||||
selected,
|
||||
className={cx({
|
||||
[s.selected]: selected,
|
||||
})}
|
||||
>
|
||||
<ActiveLink
|
||||
|
||||
Reference in new issue
Block a user