-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sign in with facebook and google modal
- Loading branch information
Showing
12 changed files
with
270 additions
and
40 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,38 +1,14 @@ | ||
.App { | ||
text-align: center; | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
.btn:focus, | ||
.btn:active, | ||
.btn:hover, | ||
.btn { | ||
outline: none !important; | ||
box-shadow: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
.background-facebook { | ||
background-color: #4267b2; | ||
} |
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,21 @@ | ||
.bg-modal-login { | ||
background-image: url('../../../images/login/bg-modal.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
background-size: cover; | ||
} | ||
|
||
@media (max-width: 522px) { | ||
.bg-modal-login { | ||
background-image: url('../../../images/login/bg-modal.svg'); | ||
background-repeat: no-repeat; | ||
background-position: right; | ||
background-size: cover; | ||
} | ||
.bg-modal-login-2 { | ||
background-image: url('../../../images/login/bg-modal.svg'); | ||
background-repeat: no-repeat; | ||
background-position: 15% 15%; | ||
background-size: cover; | ||
} | ||
} |
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,74 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { Modal, Button } from 'react-bootstrap' | ||
import { useTranslation } from 'react-i18next' | ||
import './Login.css' | ||
import Close from '../../../images/login/close.svg' | ||
import Google from '../../../images/login/google.svg' | ||
import Facebook from '../../../images/login/facebook.svg' | ||
|
||
function Login({ onHide }) { | ||
const { t } = useTranslation() | ||
return ( | ||
<div> | ||
<Modal show centered className="rounded"> | ||
<div className="bg-modal-login bg-modal-login-2"> | ||
<div className="d-flex justify-content-end"> | ||
<button | ||
type="button" | ||
className="bg-transparent border-0 m-1" | ||
onClick={onHide} | ||
> | ||
<img | ||
src={Close} | ||
className="w-75 h-75" | ||
alt="close modal" | ||
/> | ||
</button> | ||
</div> | ||
<div className="d-flex justify-content-center text-white mt-2"> | ||
<h4>{t('login.log-in')}</h4> | ||
</div> | ||
<div className="d-flex justify-content-center mt-5 mb-5"> | ||
<Button className="bg-white text-black w-50 rounded d-flex justify-content-center align-items-center py-2 border-0"> | ||
<img | ||
src={Google} | ||
alt="google icon" | ||
width="19" | ||
height="19" | ||
className="d-block mt-1 mx-2 " | ||
/> | ||
<p className="text-dark my-auto small "> | ||
{t('login.google')} | ||
</p> | ||
</Button> | ||
</div> | ||
<div className="d-flex justify-content-center mb-5 pb-5"> | ||
<Button className="background-facebook text-black w-50 rounded d-flex justify-content-center align-items-center py-2 border-0"> | ||
<img | ||
src={Facebook} | ||
alt="Facebook icon" | ||
width="21" | ||
height="21" | ||
className="d-block mt-0 mx-2 " | ||
/> | ||
<p | ||
className="text-white my-auto small | ||
" | ||
> | ||
{t('login.facebook')} | ||
</p> | ||
</Button> | ||
</div> | ||
</div> | ||
</Modal> | ||
</div> | ||
) | ||
} | ||
|
||
Login.propTypes = { | ||
onHide: PropTypes.func.isRequired, | ||
} | ||
|
||
export default Login |
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.