-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Facundo Martinez
authored and
Facundo Martinez
committed
Feb 14, 2021
1 parent
499e004
commit 4ae9fbd
Showing
25 changed files
with
694 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,16 @@ | ||
import React, { useState } from 'react'; | ||
import './styles.scss'; | ||
|
||
const Modal = ({ hideModal, toggleModal, children }) => { | ||
if (hideModal) return null; | ||
|
||
return ( | ||
<> | ||
<div className="modalOverlay" onClick={() => toggleModal()} /> <div className="modal"> | ||
{children} | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default Modal; |
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,21 @@ | ||
.modalOverlay { | ||
position: fixed; | ||
top: 0; left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0,0,0,.3); | ||
} | ||
|
||
.modal { | ||
position: absolute; | ||
top: 50%; left: 50%; | ||
-webkit-transform: translate(-50%, -50%); | ||
-moz-transform: translate(-50%, -50%); | ||
transform: translate(-50%, -50%); | ||
background-color: white; | ||
width: 95%; | ||
padding: 2rem; | ||
max-width: 60rem; | ||
height: auto; | ||
min-height: 40.0rem; | ||
} |
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,27 @@ | ||
import React from 'react' | ||
import './styles.scss' | ||
import userIMG from './../../assets/user.png' | ||
|
||
const UserProfile = (props) => { | ||
const {currentUser} = props; | ||
const {displayName} = currentUser | ||
return ( | ||
<div className='userProfile'> | ||
<ul> | ||
<li> | ||
<div className='img'> | ||
<img src={userIMG} /> | ||
</div> | ||
</li> | ||
<li> | ||
<span className='displayName'> | ||
{displayName && displayName} | ||
</span> | ||
</li> | ||
</ul> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
export default UserProfile |
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,31 @@ | ||
.userProfile { | ||
display: block; | ||
width: 100%; | ||
margin: 3rem auto 1rem; | ||
|
||
ul, li { | ||
margin: 0; | ||
padding: 0; | ||
list-style-type: none; | ||
} | ||
ul { | ||
li{ | ||
display: block; | ||
width: 100%; | ||
.img{ | ||
display: block; | ||
width: 5.0rem; | ||
margin: 0 auto; | ||
} | ||
} | ||
.displayName { | ||
display: block; | ||
width: 100%; | ||
text-align: center; | ||
margin: 1rem auto; | ||
font-size: 1.8rem; | ||
line-height: 1; | ||
text-transform: uppercase; | ||
} | ||
} | ||
} |
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,22 @@ | ||
import React from 'react'; | ||
import { useSelector } from 'react-redux' | ||
import UserProfile from './../UserProfile'; | ||
import './styles.scss'; | ||
|
||
const VerticalNav = ({children}) => { | ||
const currentUser = useSelector(state => state.user.currentUser) | ||
const configUserProfile = { | ||
currentUser | ||
} | ||
return ( | ||
<div className='verticalNav'> | ||
<UserProfile {...configUserProfile} /> | ||
<div className='menu'> | ||
{children} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
|
||
export default VerticalNav |
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,34 @@ | ||
.verticalNav { | ||
width: 100%; | ||
height: 100%; | ||
.menu{ | ||
margin: 3rem auto 0; | ||
ul, li { | ||
margin: 0; | ||
padding: 0; | ||
list-style-type: none; | ||
} | ||
ul { | ||
li { | ||
width: 100%; | ||
border-bottom: 1px solid #d3d3d3; | ||
|
||
&:first-child { | ||
border-top: 1px solid #d3d3d3; | ||
} | ||
a, span { | ||
display: block; | ||
width: 100%; | ||
padding: 2rem; | ||
font-size: 1.6rem; | ||
line-height: 1; | ||
color: black; | ||
cursor: pointer; | ||
} | ||
&:hover { | ||
background-color: #d3d3d3; | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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,28 @@ | ||
import React from 'react'; | ||
import './styles.scss'; | ||
|
||
const FormSelect = ({ options, defaultValue, handleChange, label, ...otherProps }) => { | ||
if (!Array.isArray(options) || options.length < 1) return null; | ||
|
||
return ( | ||
<div className="formRow"> | ||
{label && ( | ||
<label> | ||
{label} | ||
</label> | ||
)} | ||
|
||
<select className="formSelect" value={defaultValue} onChange={handleChange} {...otherProps}> | ||
{options.map((option, index) => { | ||
const { value, name } = option; | ||
|
||
return ( | ||
<option key={index} value={value}>{name}</option> | ||
); | ||
})} | ||
</select> | ||
</div> | ||
); | ||
} | ||
|
||
export default FormSelect; |
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,25 @@ | ||
.formRow { | ||
display: inline-block; | ||
width: 100%; | ||
|
||
label { | ||
display: block; | ||
width: 100%; | ||
text-align: left; | ||
} | ||
|
||
select { | ||
display: block; | ||
width: auto; | ||
float: left; | ||
font-size: 1.5rem; | ||
line-height: 1; | ||
font-weight: 400; | ||
text-align: left; | ||
padding: 10px 0px; | ||
margin: 10px auto; | ||
border: none; | ||
outline: none; | ||
cursor: pointer; | ||
} | ||
} |
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
Oops, something went wrong.