goobs-frontend 0.8.13 → 0.8.15
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/package.json +13 -13
- package/src/components/Button/index.tsx +44 -27
- package/src/components/DataGrid/Footer/index.tsx +1 -0
- package/src/components/Form/DataGrid/index.tsx +2 -0
- package/src/components/Nav/VerticalVariant/mainNav/index.tsx +163 -0
- package/src/components/Nav/VerticalVariant/subNav/index.tsx +156 -0
- package/src/components/Nav/VerticalVariant/viewNav/index.tsx +75 -0
- package/src/components/Nav/index.tsx +313 -119
- package/src/components/PricingTable/defaultconfig.tsx +9 -0
- package/src/components/Tabs/index.tsx +195 -0
- package/src/index.ts +41 -12
- package/src/components/Nav/HorizontalVariant/index.tsx +0 -146
- package/src/components/Nav/VerticalVariant/index.tsx +0 -445
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goobs-frontend",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A comprehensive React-based UI library built on Material-UI, offering a wide range of customizable components including grids, typography, buttons, cards, forms, navigation, pricing tables, steppers, tooltips, accordions, and more. Designed for building responsive and consistent user interfaces with advanced features like form validation, theming, and code syntax highlighting.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@emotion/cache": "^11.14.0",
|
|
23
23
|
"@emotion/react": "^11.14.0",
|
|
24
24
|
"@emotion/styled": "^11.14.0",
|
|
25
|
-
"@mui/icons-material": "^6.
|
|
26
|
-
"@mui/material": "^6.
|
|
25
|
+
"@mui/icons-material": "^6.3.0",
|
|
26
|
+
"@mui/material": "^6.3.0",
|
|
27
27
|
"@types/lodash": "^4.17.13",
|
|
28
|
-
"highlight.js": "^11.
|
|
29
|
-
"jotai": "^2.
|
|
28
|
+
"highlight.js": "^11.11.1",
|
|
29
|
+
"jotai": "^2.11.0",
|
|
30
30
|
"lodash": "^4.17.21",
|
|
31
|
-
"next": "15.1.
|
|
31
|
+
"next": "15.1.3",
|
|
32
32
|
"otplib": "^12.0.1",
|
|
33
33
|
"react-datepicker": "^7.5.0",
|
|
34
34
|
"react-qr-code": "^2.0.15",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"slate-react": "^0.112.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@next/eslint-plugin-next": "^15.1.
|
|
41
|
+
"@next/eslint-plugin-next": "^15.1.3",
|
|
42
42
|
"@types/node": "^22.10.2",
|
|
43
|
-
"@types/react": "19.0.
|
|
44
|
-
"@types/react-dom": "^19.0.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
46
|
-
"@typescript-eslint/parser": "^8.
|
|
47
|
-
"eslint": "^9.
|
|
48
|
-
"eslint-config-next": "^15.1.
|
|
43
|
+
"@types/react": "19.0.2",
|
|
44
|
+
"@types/react-dom": "^19.0.2",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.19.0",
|
|
47
|
+
"eslint": "^9.17.0",
|
|
48
|
+
"eslint-config-next": "^15.1.3",
|
|
49
49
|
"eslint-config-prettier": "^9.1.0",
|
|
50
50
|
"eslint-plugin-prettier": "^5.2.1",
|
|
51
51
|
"prettier": "^3.4.2",
|
|
@@ -29,35 +29,52 @@ const StyledButton = styled(Button, {
|
|
|
29
29
|
backgroundcolor?: string
|
|
30
30
|
iconlocation?: 'left' | 'right' | 'above'
|
|
31
31
|
fontlocation?: 'left' | 'center' | 'right'
|
|
32
|
-
}>(({ backgroundcolor, iconlocation, fontlocation }) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
display: 'flex',
|
|
38
|
-
flexDirection: iconlocation === 'above' ? 'column' : 'row',
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
justifyContent:
|
|
41
|
-
fontlocation === 'left'
|
|
42
|
-
? 'flex-start'
|
|
43
|
-
: fontlocation === 'right'
|
|
44
|
-
? 'flex-end'
|
|
45
|
-
: 'center',
|
|
46
|
-
gap: '8px',
|
|
47
|
-
...(backgroundcolor && {
|
|
48
|
-
backgroundColor: backgroundcolor,
|
|
49
|
-
'&:hover': {
|
|
32
|
+
}>(({ backgroundcolor, iconlocation, fontlocation }) => {
|
|
33
|
+
// Determine styles based on backgroundcolor
|
|
34
|
+
let backgroundStyles = {}
|
|
35
|
+
if (backgroundcolor && backgroundcolor !== 'none') {
|
|
36
|
+
backgroundStyles = {
|
|
50
37
|
backgroundColor: backgroundcolor,
|
|
51
|
-
|
|
38
|
+
'&:hover': {
|
|
39
|
+
backgroundColor: backgroundcolor,
|
|
40
|
+
opacity: 0.9,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
} else if (backgroundcolor === 'none') {
|
|
44
|
+
// No background, behave like a text button
|
|
45
|
+
backgroundStyles = {
|
|
46
|
+
backgroundColor: 'transparent',
|
|
47
|
+
'&:hover': {
|
|
48
|
+
backgroundColor: 'transparent',
|
|
49
|
+
opacity: 0.9,
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
minWidth: 'auto',
|
|
56
|
+
width: '100%',
|
|
57
|
+
height: '40px',
|
|
58
|
+
padding: '8px 16px',
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: iconlocation === 'above' ? 'column' : 'row',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
justifyContent:
|
|
63
|
+
fontlocation === 'left'
|
|
64
|
+
? 'flex-start'
|
|
65
|
+
: fontlocation === 'right'
|
|
66
|
+
? 'flex-end'
|
|
67
|
+
: 'center',
|
|
68
|
+
gap: '8px',
|
|
69
|
+
...backgroundStyles,
|
|
70
|
+
'& .MuiButton-startIcon': {
|
|
71
|
+
margin: 0,
|
|
52
72
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
margin: 0,
|
|
59
|
-
},
|
|
60
|
-
}))
|
|
73
|
+
'& .MuiButton-endIcon': {
|
|
74
|
+
margin: 0,
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
})
|
|
61
78
|
|
|
62
79
|
const StyledBox = styled(Box)({
|
|
63
80
|
display: 'flex',
|
|
@@ -44,6 +44,7 @@ function FormDataGrid({ title, description, datagrid }: FormDataGridProps) {
|
|
|
44
44
|
width: '100%',
|
|
45
45
|
textAlign: 'left',
|
|
46
46
|
fontFamily: 'Merriweather',
|
|
47
|
+
marginLeft: 2,
|
|
47
48
|
fontSize: '1.5rem',
|
|
48
49
|
fontWeight: 400,
|
|
49
50
|
color: 'black',
|
|
@@ -57,6 +58,7 @@ function FormDataGrid({ title, description, datagrid }: FormDataGridProps) {
|
|
|
57
58
|
textAlign: 'left',
|
|
58
59
|
fontFamily: 'Merriweather',
|
|
59
60
|
fontSize: '1.25rem',
|
|
61
|
+
marginLeft: 2,
|
|
60
62
|
fontWeight: 400,
|
|
61
63
|
color: 'black',
|
|
62
64
|
}}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import React, { FC } from 'react'
|
|
3
|
+
import {
|
|
4
|
+
Accordion as MuiAccordion,
|
|
5
|
+
AccordionSummary,
|
|
6
|
+
AccordionDetails,
|
|
7
|
+
List,
|
|
8
|
+
} from '@mui/material'
|
|
9
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
10
|
+
import { white } from '../../../../styles/palette'
|
|
11
|
+
import { Typography } from '../../../Typography'
|
|
12
|
+
|
|
13
|
+
interface MainNavComponentProps {
|
|
14
|
+
/**
|
|
15
|
+
* The label/title for this main navigation item.
|
|
16
|
+
*/
|
|
17
|
+
title?: string
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* If `true`, we show an expand icon and child subNav items.
|
|
21
|
+
*/
|
|
22
|
+
hasChildren: boolean
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Which top-level nav titles are expanded
|
|
26
|
+
*/
|
|
27
|
+
expandedNavs: string[]
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Setter for expandedNavs
|
|
31
|
+
*/
|
|
32
|
+
setExpandedNavs: React.Dispatch<React.SetStateAction<string[]>>
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A callback for route or onClick triggers
|
|
36
|
+
*/
|
|
37
|
+
onClick?: () => void
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The nesting level for indentation
|
|
41
|
+
*/
|
|
42
|
+
level: number
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Child nodes (subNav) if `hasChildren` is true
|
|
46
|
+
*/
|
|
47
|
+
children?: React.ReactNode
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Hover color (not used in the example styling, but available if needed)
|
|
51
|
+
*/
|
|
52
|
+
activeAndHoverColor?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const MainNavComponent: FC<MainNavComponentProps> = ({
|
|
56
|
+
title,
|
|
57
|
+
hasChildren,
|
|
58
|
+
expandedNavs,
|
|
59
|
+
setExpandedNavs,
|
|
60
|
+
onClick,
|
|
61
|
+
level,
|
|
62
|
+
children,
|
|
63
|
+
}) => {
|
|
64
|
+
const isExpanded = expandedNavs.includes(title ?? '')
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<MuiAccordion
|
|
68
|
+
disableGutters
|
|
69
|
+
elevation={0}
|
|
70
|
+
square
|
|
71
|
+
expanded={isExpanded}
|
|
72
|
+
onChange={() => {
|
|
73
|
+
if (isExpanded) {
|
|
74
|
+
setExpandedNavs(expandedNavs.filter(t => t !== title))
|
|
75
|
+
} else {
|
|
76
|
+
setExpandedNavs([...expandedNavs, title ?? ''])
|
|
77
|
+
}
|
|
78
|
+
}}
|
|
79
|
+
sx={{
|
|
80
|
+
pl: 0,
|
|
81
|
+
backgroundColor: 'transparent',
|
|
82
|
+
'.MuiAccordionSummary-root': {
|
|
83
|
+
pl: 0,
|
|
84
|
+
whiteSpace: 'nowrap', // no wrapping
|
|
85
|
+
},
|
|
86
|
+
'&:before': {
|
|
87
|
+
display: 'none',
|
|
88
|
+
},
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
<AccordionSummary
|
|
92
|
+
expandIcon={
|
|
93
|
+
hasChildren ? (
|
|
94
|
+
<ExpandMoreIcon
|
|
95
|
+
sx={{
|
|
96
|
+
color: 'transparent',
|
|
97
|
+
}}
|
|
98
|
+
/>
|
|
99
|
+
) : null
|
|
100
|
+
}
|
|
101
|
+
aria-controls="accordion-content"
|
|
102
|
+
id="accordion-header"
|
|
103
|
+
sx={{
|
|
104
|
+
boxSizing: 'border-box',
|
|
105
|
+
border: 'none',
|
|
106
|
+
py: '6px',
|
|
107
|
+
mt: 2,
|
|
108
|
+
ml: 3,
|
|
109
|
+
minHeight: 0,
|
|
110
|
+
height: '32px',
|
|
111
|
+
'& .MuiAccordionSummary-content': {
|
|
112
|
+
m: 0,
|
|
113
|
+
whiteSpace: 'nowrap', // keep text on one line
|
|
114
|
+
},
|
|
115
|
+
'&:hover': {
|
|
116
|
+
'& .MuiSvgIcon-root': {
|
|
117
|
+
color: white.main,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
'&.Mui-expanded': {
|
|
121
|
+
'& .MuiSvgIcon-root': {
|
|
122
|
+
color: white.main,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
}}
|
|
126
|
+
onClick={() => {
|
|
127
|
+
if (onClick) onClick()
|
|
128
|
+
}}
|
|
129
|
+
>
|
|
130
|
+
<Typography
|
|
131
|
+
fontvariant="merrih5"
|
|
132
|
+
fontcolor={white.main}
|
|
133
|
+
text={title ?? ''}
|
|
134
|
+
marginLeft={4 * level}
|
|
135
|
+
sx={{
|
|
136
|
+
whiteSpace: 'nowrap', // no wrapping
|
|
137
|
+
}}
|
|
138
|
+
/>
|
|
139
|
+
</AccordionSummary>
|
|
140
|
+
|
|
141
|
+
{hasChildren && (
|
|
142
|
+
<AccordionDetails
|
|
143
|
+
sx={{
|
|
144
|
+
border: 'none',
|
|
145
|
+
p: 0,
|
|
146
|
+
whiteSpace: 'nowrap',
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
<List
|
|
150
|
+
sx={{
|
|
151
|
+
py: 0,
|
|
152
|
+
whiteSpace: 'nowrap',
|
|
153
|
+
}}
|
|
154
|
+
>
|
|
155
|
+
{children}
|
|
156
|
+
</List>
|
|
157
|
+
</AccordionDetails>
|
|
158
|
+
)}
|
|
159
|
+
</MuiAccordion>
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export default MainNavComponent
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import React, { FC } from 'react'
|
|
3
|
+
import {
|
|
4
|
+
Accordion as MuiAccordion,
|
|
5
|
+
AccordionSummary,
|
|
6
|
+
AccordionDetails,
|
|
7
|
+
List,
|
|
8
|
+
MenuItem,
|
|
9
|
+
} from '@mui/material'
|
|
10
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
11
|
+
import Link from 'next/link'
|
|
12
|
+
import { white } from '../../../../styles/palette'
|
|
13
|
+
import { Typography } from '../../../Typography'
|
|
14
|
+
|
|
15
|
+
interface SubNavComponentProps {
|
|
16
|
+
title?: string
|
|
17
|
+
route?: string
|
|
18
|
+
trigger?: 'route' | 'onClick'
|
|
19
|
+
expandedSubnavs: string[]
|
|
20
|
+
setExpandedSubnavs: React.Dispatch<React.SetStateAction<string[]>>
|
|
21
|
+
activeAndHoverColor: string
|
|
22
|
+
onClose?: () => void
|
|
23
|
+
variant?: 'temporary' | 'permanent'
|
|
24
|
+
hasChildren: boolean
|
|
25
|
+
children?: React.ReactNode
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const SubNavComponent: FC<SubNavComponentProps> = ({
|
|
29
|
+
title,
|
|
30
|
+
route,
|
|
31
|
+
trigger,
|
|
32
|
+
expandedSubnavs,
|
|
33
|
+
setExpandedSubnavs,
|
|
34
|
+
activeAndHoverColor,
|
|
35
|
+
onClose,
|
|
36
|
+
variant,
|
|
37
|
+
hasChildren,
|
|
38
|
+
children,
|
|
39
|
+
}) => {
|
|
40
|
+
const isExpanded = expandedSubnavs.includes(title ?? '')
|
|
41
|
+
|
|
42
|
+
// If no children => a single route
|
|
43
|
+
if (!hasChildren) {
|
|
44
|
+
return (
|
|
45
|
+
<Link
|
|
46
|
+
key={title}
|
|
47
|
+
style={{ textDecoration: 'none', color: 'white' }}
|
|
48
|
+
href={route ?? ''}
|
|
49
|
+
>
|
|
50
|
+
<MenuItem
|
|
51
|
+
sx={{
|
|
52
|
+
color: white.main,
|
|
53
|
+
ml: '25px',
|
|
54
|
+
'&:hover': { backgroundColor: activeAndHoverColor },
|
|
55
|
+
'&:active': { backgroundColor: activeAndHoverColor },
|
|
56
|
+
whiteSpace: 'nowrap', // keep text on a single line
|
|
57
|
+
}}
|
|
58
|
+
onClick={() => {
|
|
59
|
+
if (trigger === 'route' && variant === 'temporary' && onClose) {
|
|
60
|
+
onClose()
|
|
61
|
+
}
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
<Typography
|
|
65
|
+
fontvariant="merrih6"
|
|
66
|
+
text={title ?? ''}
|
|
67
|
+
fontcolor={white.main}
|
|
68
|
+
/>
|
|
69
|
+
</MenuItem>
|
|
70
|
+
</Link>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// If we do have children => an accordion with view items
|
|
75
|
+
return (
|
|
76
|
+
<MuiAccordion
|
|
77
|
+
key={title}
|
|
78
|
+
disableGutters
|
|
79
|
+
elevation={0}
|
|
80
|
+
square
|
|
81
|
+
expanded={isExpanded}
|
|
82
|
+
onChange={() => {
|
|
83
|
+
if (isExpanded) {
|
|
84
|
+
setExpandedSubnavs(expandedSubnavs.filter(t => t !== title))
|
|
85
|
+
} else {
|
|
86
|
+
setExpandedSubnavs([...expandedSubnavs, title ?? ''])
|
|
87
|
+
}
|
|
88
|
+
}}
|
|
89
|
+
sx={{
|
|
90
|
+
pl: 0,
|
|
91
|
+
backgroundColor: 'transparent',
|
|
92
|
+
'.MuiAccordionSummary-root': {
|
|
93
|
+
pl: 0,
|
|
94
|
+
whiteSpace: 'nowrap',
|
|
95
|
+
},
|
|
96
|
+
'&:before': { display: 'none' },
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
<AccordionSummary
|
|
100
|
+
expandIcon={
|
|
101
|
+
<ExpandMoreIcon
|
|
102
|
+
sx={{
|
|
103
|
+
color: 'transparent',
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
}
|
|
107
|
+
aria-controls="accordion-content"
|
|
108
|
+
id="accordion-header"
|
|
109
|
+
sx={{
|
|
110
|
+
boxSizing: 'border-box',
|
|
111
|
+
border: 'none',
|
|
112
|
+
py: '6px',
|
|
113
|
+
mt: 0,
|
|
114
|
+
ml: '8px',
|
|
115
|
+
minHeight: 0,
|
|
116
|
+
height: '32px',
|
|
117
|
+
'& .MuiAccordionSummary-content': {
|
|
118
|
+
m: 0,
|
|
119
|
+
whiteSpace: 'nowrap',
|
|
120
|
+
},
|
|
121
|
+
'&:hover': {
|
|
122
|
+
'& .MuiSvgIcon-root': {
|
|
123
|
+
color: white.main,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
'&.Mui-expanded': {
|
|
127
|
+
'& .MuiSvgIcon-root': {
|
|
128
|
+
color: white.main,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
}}
|
|
132
|
+
>
|
|
133
|
+
<Typography
|
|
134
|
+
fontvariant="merrih6"
|
|
135
|
+
fontcolor={white.main}
|
|
136
|
+
text={title ?? ''}
|
|
137
|
+
marginLeft={4}
|
|
138
|
+
sx={{
|
|
139
|
+
whiteSpace: 'nowrap',
|
|
140
|
+
}}
|
|
141
|
+
/>
|
|
142
|
+
</AccordionSummary>
|
|
143
|
+
<AccordionDetails
|
|
144
|
+
sx={{
|
|
145
|
+
border: 'none',
|
|
146
|
+
p: 0,
|
|
147
|
+
whiteSpace: 'nowrap',
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
<List sx={{ py: 0, whiteSpace: 'nowrap' }}>{children}</List>
|
|
151
|
+
</AccordionDetails>
|
|
152
|
+
</MuiAccordion>
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export default SubNavComponent
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import React, { FC } from 'react'
|
|
3
|
+
import { MenuItem } from '@mui/material'
|
|
4
|
+
import Link from 'next/link'
|
|
5
|
+
import { semiTransparentWhite, white } from '../../../../styles/palette'
|
|
6
|
+
import { Typography } from '../../../Typography'
|
|
7
|
+
|
|
8
|
+
interface ViewNavProps {
|
|
9
|
+
title?: string
|
|
10
|
+
route?: string
|
|
11
|
+
trigger?: 'route' | 'onClick'
|
|
12
|
+
onClick?: () => void
|
|
13
|
+
level: number
|
|
14
|
+
activeAndHoverColor?: string
|
|
15
|
+
onClose?: () => void
|
|
16
|
+
variant?: 'temporary' | 'permanent'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const ViewNav: FC<ViewNavProps> = ({
|
|
20
|
+
title,
|
|
21
|
+
route,
|
|
22
|
+
trigger,
|
|
23
|
+
onClick,
|
|
24
|
+
level,
|
|
25
|
+
activeAndHoverColor = semiTransparentWhite.main,
|
|
26
|
+
onClose,
|
|
27
|
+
variant,
|
|
28
|
+
}) => {
|
|
29
|
+
return (
|
|
30
|
+
<Link
|
|
31
|
+
key={title}
|
|
32
|
+
href={route ?? ''}
|
|
33
|
+
style={{
|
|
34
|
+
textDecoration: 'none',
|
|
35
|
+
color: 'white',
|
|
36
|
+
whiteSpace: 'nowrap', // keep text in one line
|
|
37
|
+
}}
|
|
38
|
+
onClick={() => {
|
|
39
|
+
if (trigger === 'route' && variant === 'temporary' && onClose) {
|
|
40
|
+
onClose()
|
|
41
|
+
} else if (trigger === 'onClick' && onClick) {
|
|
42
|
+
onClick()
|
|
43
|
+
if (variant === 'temporary' && onClose) {
|
|
44
|
+
onClose()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
<MenuItem
|
|
50
|
+
sx={{
|
|
51
|
+
color: white.main,
|
|
52
|
+
pl: level + 6,
|
|
53
|
+
whiteSpace: 'nowrap',
|
|
54
|
+
'&:hover': {
|
|
55
|
+
backgroundColor: activeAndHoverColor,
|
|
56
|
+
},
|
|
57
|
+
'&:active': {
|
|
58
|
+
backgroundColor: activeAndHoverColor,
|
|
59
|
+
},
|
|
60
|
+
}}
|
|
61
|
+
>
|
|
62
|
+
<Typography
|
|
63
|
+
fontvariant="merriparagraph"
|
|
64
|
+
text={title ?? ''}
|
|
65
|
+
fontcolor={white.main}
|
|
66
|
+
sx={{
|
|
67
|
+
whiteSpace: 'nowrap',
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
</MenuItem>
|
|
71
|
+
</Link>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default ViewNav
|