Skip to content

Commit

Permalink
update: wrapper added
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchayan721 committed Aug 27, 2023
1 parent 9462c4c commit e4d0230
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
8 changes: 2 additions & 6 deletions src/components/navigation/NavBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import React, { FC } from 'react';
import { Card, CardProps, styled } from '@mui/material';
import { Card, styled } from '@mui/material';
import { navbar } from '@theme/constants';
import Toolbar from './Toolbar';
import { useNavigationMenuState } from '@helpers/NavigationMenuStateProvider';
import LinkHome from './LinkHome';

interface BarProps extends CardProps {
component?: React.ElementType;
open?: boolean;
}
import { BarProps } from '@interfaces/CardProps';

const Bar = styled(Card)<BarProps>(({ theme, open }) => ({
width: '100%',
Expand Down
48 changes: 27 additions & 21 deletions src/components/navigation/NavMenu/Megamenu/NavGroups/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Navgroup = styled('ul')(({ theme }) => ({
margin: 0,
width: '100%',
minHeight: '12rem',

'&:hover': {
'& .group__card': {
transform: `translateX(0)`,
Expand Down Expand Up @@ -59,18 +59,22 @@ const GroupCard = styled(Card)(({ theme }) => ({
[theme.breakpoints.down('md')]: {
borderRadius: 0,
},

'& li': {
width: '100%',
margin: `${theme.Spaces.xxs} ${theme.Spaces.sm}`,
}));

'&:first-of-type': {
marginTop: theme.Spaces.md,
},
const NavList = styled('div')(({ theme }) => ({
padding: `0 ${theme.Spaces.sm}`,
margin: `${theme.Spaces.sm} 0`,
width: '100%',
overflow: 'hidden',

'&:last-of-type': {
marginBottom: theme.Spaces.md,
},
'& li': {
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-start',
alignItems: 'flex-start',
listStyle: 'none',
width: '100%',
margin: `${theme.Spaces.xxs} 0`,

'& a': {
display: 'flex',
Expand Down Expand Up @@ -152,16 +156,18 @@ const NavGroups = ({ title, videoUrl, items }: NavGroupsProps) => {
<Title>
{title}
</Title>
{items.map(({ title: pageName, link: href }, index) => (
<li key={index}>
<Link href={href} >
<Dot />
<Typography variant="body2" component="p">
{pageName}
</Typography>
</Link>
</li>
))}
<NavList>
{items.map(({ title: pageName, link: href }, index) => (
<li key={index}>
<Link href={href} >
<Dot />
<Typography variant="body2" component="p">
{pageName}
</Typography>
</Link>
</li>
))}
</NavList>
</GroupCard>
</Navgroup>
)
Expand Down
1 change: 0 additions & 1 deletion src/components/navigation/NavMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useNavigationMenuState } from '@helpers/NavigationMenuStateProvider';
import { NavigationCardProps } from '@interfaces/CardProps';
import { Box, Card, styled } from '@mui/material';
import { navbar } from '@theme/constants';
import React from 'react';
import Display from './Display';
import Contact from './Contact';
Expand Down

0 comments on commit e4d0230

Please sign in to comment.