-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create navbar component with style #40
- Loading branch information
mohammedsalah7
committed
Nov 1, 2021
1 parent
1b876bf
commit 743ebee
Showing
5 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import React, { useState } from 'react'; | ||
import { Link as RouterLink } from 'react-router-dom'; | ||
import Link from '@mui/material/Link'; | ||
import { | ||
ListItem, ListItemText, Button, Avatar, Container, List, | ||
} from '@mui/material'; | ||
import './style.css'; | ||
|
||
import Logo from '../../asstes/logo.png'; | ||
import PresonImg from '../../asstes/avatar.png'; | ||
|
||
function NavBar() { | ||
const [state, setstate] = useState(true); | ||
return ( | ||
<Container maxWidth="xl"> | ||
<nav className="container"> | ||
<Link component={RouterLink} to="/"> | ||
<img src={Logo} alt="logo-housy" className="img-logo" /> | ||
</Link> | ||
{' '} | ||
<List | ||
className="list" | ||
sx={{ justifyContent: 'space-between' }} | ||
style={{ | ||
marginRight: '150px', alignSelf: 'center', color: '#797B7D', | ||
}} | ||
> | ||
<Link component={RouterLink} to="/" style={{ color: '#797B7D', textDecoration: 'none' }}> | ||
<ListItem button style={{ textDecoration: 'none' }}> | ||
<ListItemText primary="Home" /> | ||
</ListItem> | ||
</Link> | ||
|
||
<Link component={RouterLink} to="/signup" style={{ color: '#797B7D', textDecoration: 'none' }}> | ||
<ListItem button> | ||
<ListItemText primary="About" /> | ||
</ListItem> | ||
</Link> | ||
<Link component={RouterLink} to="/" style={{ color: '#797B7D', textDecoration: 'none' }}> | ||
<ListItem button> | ||
<ListItemText primary="Buy" /> | ||
</ListItem> | ||
</Link> | ||
<Link component={RouterLink} to="/" style={{ color: '#797B7D', textDecoration: 'none' }}> | ||
<ListItem button> | ||
<ListItemText primary="Rent" /> | ||
</ListItem> | ||
</Link> | ||
</List> | ||
{/* </Stack> */} | ||
|
||
<div className="agent"> | ||
<Button style={{ | ||
marginRight: '30px', alignSelf: 'center', backgroundColor: '#3781CB', color: '#FFFFFF', textTransform: 'none', | ||
}} | ||
> | ||
{' '} | ||
<Link component={RouterLink} to="/login" className="btn-host"> | ||
<ListItemText primary="Host my House" style={{ color: '#fff' }} /> | ||
</Link> | ||
</Button> | ||
{state ? ( | ||
<Link component={RouterLink} to="/"> | ||
<Avatar src={PresonImg} /> | ||
</Link> | ||
) : ( | ||
'' | ||
)} | ||
</div> | ||
|
||
</nav> | ||
</Container> | ||
|
||
); | ||
} | ||
export default NavBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.container{ | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-around; | ||
|
||
} | ||
.img-logo{ | ||
width: 90px; | ||
height: 80px; | ||
|
||
} | ||
.list{ | ||
display: flex ; | ||
align-self: center; | ||
|
||
} | ||
.agent{ | ||
|
||
display: flex ; | ||
flex-direction: row ; | ||
align-self: center; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters