@@ -6,7 +6,7 @@ import MoreVertIcon from '@mui/icons-material/MoreVert';
6
6
import NavBarButtons from './NavBarButtons' ;
7
7
import NewExportButton from './NewExportButton' ;
8
8
import { RootState } from '../../redux/store' ;
9
- import logo from '../../public/icons/win/blue-R-white-bg .png' ;
9
+ import logo from '../../public/icons/win/logo .png' ;
10
10
import { useSelector , useDispatch } from 'react-redux' ;
11
11
import {
12
12
publishProject ,
@@ -22,22 +22,6 @@ import {
22
22
import { State } from '../../interfaces/Interfaces' ;
23
23
import MuiAlert , { AlertProps } from '@mui/material/Alert' ;
24
24
import Snackbar from '@mui/material/Snackbar' ;
25
- import {
26
- Send ,
27
- CancelScheduleSend ,
28
- MoreVert ,
29
- ManageSearch ,
30
- Menu
31
- } from '@mui/icons-material/' ;
32
- import { styled , alpha } from '@mui/material/styles' ;
33
- import {
34
- AppBar ,
35
- Box ,
36
- Toolbar ,
37
- IconButton ,
38
- Typography ,
39
- InputBase
40
- } from '@mui/material' ;
41
25
42
26
const NavBar : React . FC = ( ) => {
43
27
const [ dropMenu , setDropMenu ] = useState ( false ) ;
@@ -58,43 +42,6 @@ const NavBar: React.FC = () => {
58
42
const [ openAlert , setOpenAlert ] = React . useState < boolean > ( false ) ;
59
43
const [ loginAlert , setLoginAlert ] = React . useState < boolean > ( false ) ;
60
44
61
- const SearchIconWrapper = styled ( 'div' ) ( ( { theme } ) => ( {
62
- padding : theme . spacing ( 0 , 2 ) ,
63
- height : '100%' ,
64
- position : 'absolute' ,
65
- pointerEvents : 'none' ,
66
- display : 'flex' ,
67
- alignItems : 'center' ,
68
- justifyContent : 'center'
69
- } ) ) ;
70
-
71
- const Search = styled ( 'div' ) ( ( { theme } ) => ( {
72
- color : 'white' ,
73
- backgroundColor : '#4a4a4a' ,
74
- borderRadius : theme . shape . borderRadius ,
75
- marginRight : theme . spacing ( 2 ) ,
76
- marginLeft : 0 ,
77
- width : 'auto' ,
78
- display : 'flex' , // Make the container a flex container
79
- alignItems : 'center' // Align items vertically
80
- } ) ) ;
81
-
82
- const StyledInputBase = styled ( InputBase ) ( ( { theme } ) => ( {
83
- color : 'inherit' ,
84
- '& .MuiInputBase-input' : {
85
- padding : theme . spacing ( 1 , 5 , 1 , 0 ) ,
86
- paddingLeft : `calc(1em + ${ theme . spacing ( 6 ) } )` ,
87
- transition : theme . transitions . create ( 'width' ) ,
88
- width : '10ch' , // Adjust width as needed
89
- [ theme . breakpoints . up ( 'sm' ) ] : {
90
- width : '50ch' ,
91
- '&:focus' : {
92
- width : '60ch' // Adjust width as needed
93
- }
94
- }
95
- }
96
- } ) ) ;
97
-
98
45
useEffect ( ( ) => {
99
46
setProjectName ( state . name ) ;
100
47
} , [ state . name ] ) ;
@@ -109,9 +56,8 @@ const NavBar: React.FC = () => {
109
56
110
57
const buttonContainerStyle = {
111
58
display : 'flex' ,
112
- margin : '0' ,
113
- justifyContent : 'flex-start' ,
114
- padding : '0'
59
+ alignItems : 'center' ,
60
+ justifyContent : 'flex-start'
115
61
} ;
116
62
117
63
const buttonStyle = {
@@ -127,7 +73,8 @@ const NavBar: React.FC = () => {
127
73
} ;
128
74
129
75
const moreVertButtonStyle = {
130
- backgroundColor : 'black' ,
76
+ backgroundColor : '#333' ,
77
+ border : '1px solid #333' ,
131
78
padding : '0' ,
132
79
cursor : 'pointer' ,
133
80
display : 'flex' ,
@@ -137,7 +84,7 @@ const NavBar: React.FC = () => {
137
84
width : '30px' ,
138
85
minWidth : '20px' ,
139
86
marginLeft : '0px' ,
140
- marginRight : '5rem '
87
+ marginRight : '10px '
141
88
} ;
142
89
143
90
const handlePublish = ( ) => {
@@ -200,59 +147,30 @@ const NavBar: React.FC = () => {
200
147
< nav className = "main-navbar" style = { { backgroundColor : '#151515' } } >
201
148
< Link to = "/" style = { { textDecoration : 'none' , cursor : 'default' } } >
202
149
< div className = "main-logo" >
203
- < Avatar
204
- src = { logo }
205
- sx = { {
206
- width : '3rem' ,
207
- height : '3rem'
208
- } }
209
- />
150
+ < Avatar src = { logo } > </ Avatar >
151
+ < h1 style = { { color : '#151515' } } > reactype</ h1 >
210
152
</ div >
211
153
</ Link >
212
-
213
- < Box sx = { { flexGrow : 1 } } >
214
- < Toolbar >
215
- < IconButton
216
- size = "large"
217
- edge = "start"
218
- color = "inherit"
219
- aria-label = "open drawer"
220
- sx = { { mr : 2 } }
221
- > </ IconButton >
222
- < Typography
223
- variant = "h6"
224
- noWrap
225
- component = "div"
226
- sx = { { flexGrow : 1 , display : { xs : 'none' , sm : 'block' } } }
227
- > </ Typography >
228
- < Search >
229
- < SearchIconWrapper >
230
- < ManageSearch sx = { { marginRight : '2rem' } } />
231
- </ SearchIconWrapper >
232
- < StyledInputBase
233
- placeholder = "Search…"
234
- inputProps = { { 'aria-label' : 'search' } }
235
- />
236
- </ Search >
237
- </ Toolbar >
238
- </ Box >
239
-
240
154
< div style = { buttonContainerStyle } >
241
155
{ isMarketplace ? null : state . published ? (
242
- < Button style = { buttonStyle } onClick = { handleUnpublish } >
243
- < CancelScheduleSend
244
- style = { { color : 'white' , marginRight : '-1rem' } }
245
- />
246
- </ Button >
156
+ < button style = { buttonStyle } onClick = { handleUnpublish } >
157
+ Unpublish
158
+ </ button >
247
159
) : (
248
- < Button onClick = { handlePublish } >
249
- < Send style = { { color : '#86868b' , marginRight : '-1rem' } } />
250
- </ Button >
160
+ < button style = { buttonStyle } onClick = { handlePublish } >
161
+ Publish
162
+ </ button >
251
163
) }
252
164
< NewExportButton />
253
- < Button onClick = { ( ) => setDropMenu ( ! dropMenu ) } ref = { menuButtonRef } >
254
- < MoreVert
255
- style = { { color : '#86868b' } }
165
+ < Button
166
+ style = { moreVertButtonStyle }
167
+ variant = "contained"
168
+ color = "primary"
169
+ onClick = { ( ) => setDropMenu ( ! dropMenu ) }
170
+ ref = { menuButtonRef }
171
+ >
172
+ < MoreVertIcon
173
+ style = { { color : 'white' } }
256
174
data-testid = "more-vert-button"
257
175
/>
258
176
</ Button >
@@ -351,4 +269,4 @@ const NavBar: React.FC = () => {
351
269
) ;
352
270
} ;
353
271
354
- export default NavBar ;
272
+ export default NavBar ;
0 commit comments