Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BA-2345-change-link-navigation-from-navbar #227

Merged
merged 10 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @baseapp-frontend/components

## 1.0.21

### Patch Changes

- Change `Link` component in `NavItem`, to use Link from next/link instead of Material UI Link.
- Change `Header` border bottom from dashed to solid

## 1.0.20

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const CustomAppBar = styled(AppBar)<CustomAppBarProps>(({ theme, themeLay
width: '100%',
backgroundColor: theme.palette.background.default,
height: HEADER_HEIGHT.DESKTOP_OFFSET,
borderBottom: `dashed 1px ${theme.palette.divider}`,
borderBottom: `solid 1px ${theme.palette.divider}`,
}),
...(isNavMini && {
width: `calc(100% - ${NAV_WIDTH.MINI + 1}px)`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ChevronIcon } from '@baseapp-frontend/design-system/components/web/icon
import { Iconify } from '@baseapp-frontend/design-system/components/web/images'

import Box from '@mui/material/Box'
import Link from '@mui/material/Link'
import Tooltip from '@mui/material/Tooltip'
import Link from 'next/link'

import type { NavItemProps } from '../../../../types'
import { StyledNavItem } from './styled'
Expand Down Expand Up @@ -69,10 +69,9 @@ const NavItem = forwardRef<HTMLDivElement, NavItemProps>(
href={path}
target="_blank"
rel="noopener noreferrer"
color="inherit"
underline="none"
sx={{
width: 1,
style={{
color: 'inherit',
textDecoration: 'none',
...(disabled && {
pointerEvents: 'none',
}),
Expand All @@ -85,10 +84,9 @@ const NavItem = forwardRef<HTMLDivElement, NavItemProps>(
return (
<Link
href={path}
color="inherit"
underline="none"
sx={{
width: 1,
style={{
color: 'inherit',
textDecoration: 'none',
...(disabled && {
pointerEvents: 'none',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ const NavItem = forwardRef<HTMLDivElement, NavItemProps>(
href={path}
target="_blank"
rel="noopener"
color="inherit"
underline="none"
disabled={disabled}
active={active}
hasTabLayout={hasTabLayout}
Expand All @@ -88,8 +86,6 @@ const NavItem = forwardRef<HTMLDivElement, NavItemProps>(
return (
<StyledLink
href={path}
color="inherit"
underline="none"
disabled={disabled}
active={active}
hasTabLayout={hasTabLayout}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Link, ListItemButton } from '@mui/material'
import { ListItemButton } from '@mui/material'
import { styled } from '@mui/material/styles'
import Link from 'next/link'

import { StyledLinkProps, StyledNavItemProps } from './types'

Expand Down Expand Up @@ -123,6 +124,8 @@ export const StyledNavItem = styled(ListItemButton, {
export const StyledLink = styled(Link)<StyledLinkProps>(
({ theme, disabled, hasTabLayout, active }) => ({
pointerEvents: disabled ? 'none' : 'cursor',
color: 'inherit',
textDecoration: 'none',
display: 'flex',
alignItems: 'center',
borderBottom: hasTabLayout && active ? `2px solid ${theme.palette.grey[800]}` : 'none',
Expand All @@ -132,3 +135,4 @@ export const StyledLink = styled(Link)<StyledLinkProps>(
variants: [],
}),
)

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { forwardRef } from 'react'

import { ChevronIcon } from '@baseapp-frontend/design-system/components/web/icons'

import { Box, Link, Tooltip } from '@mui/material'
import { Box, Tooltip } from '@mui/material'
import Link from 'next/link'

import type { NavItemProps } from '../../../../../types'
import { StyledNavItem } from './styled'
Expand Down Expand Up @@ -87,9 +88,9 @@ const NavItem = forwardRef<HTMLDivElement, NavItemProps>(
href={path}
target="_blank"
rel="noopener"
color="inherit"
underline="none"
sx={{
style={{
color: 'inherit',
textDecoration: 'none',
...(disabled && {
pointerEvents: 'none',
}),
Expand All @@ -102,9 +103,9 @@ const NavItem = forwardRef<HTMLDivElement, NavItemProps>(
return (
<Link
href={path}
color="inherit"
underline="none"
sx={{
style={{
color: 'inherit',
textDecoration: 'none',
...(disabled && {
pointerEvents: 'none',
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/components",
"description": "BaseApp components modules such as comments, notifications, messages, and more.",
"version": "1.0.20",
"version": "1.0.21",
"sideEffects": false,
"scripts": {
"babel:transpile": "babel modules -d tmp-babel --extensions .ts,.tsx --ignore '**/__tests__/**','**/__storybook__/**'",
Expand Down
1 change: 1 addition & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading