-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(login-view): implement login-page-view
- add login component - add login styles [Finishes #162380276]
- Loading branch information
1 parent
238801e
commit 8f32218
Showing
16 changed files
with
359 additions
and
67 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
Large diffs are not rendered by default.
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
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,116 @@ | ||
@import url('https://fonts.googleapis.com/css?family=Zilla+Slab'); | ||
@import url('https://fonts.googleapis.com/css?family=Open Sans'); | ||
|
||
$facebook-color: #3B5998; | ||
$twitter-color: #00ACED; | ||
$google-color: #F44D4D; | ||
$white: #ffffff; | ||
$site-color: #007FFF; | ||
$line-color: #ced4da; | ||
%style-button { | ||
border: none; | ||
height: 50px; | ||
font-size: 14px; | ||
} | ||
%input-style { | ||
border: none; | ||
border-radius: 0px; | ||
border-bottom: 1px solid $line-color; | ||
} | ||
|
||
.login-form{ | ||
background-color: #F9F4F4; | ||
border-top-left-radius: 10px; | ||
border-bottom-left-radius: 10px; | ||
padding:80px 40px; | ||
h4{ | ||
color: $site-color; | ||
font-size: 24px; | ||
} | ||
h5{ | ||
color:#007FFF; | ||
font-size: 18px; | ||
margin-top: 90px; | ||
} | ||
} | ||
|
||
.signup{ | ||
background-color: $site-color; | ||
border-top-right-radius: 10px; | ||
border-bottom-right-radius: 10px; | ||
color: $white; | ||
padding:80px 40px; | ||
} | ||
|
||
.google-btn{ | ||
background-color: $google-color; | ||
@extend %style-button; | ||
} | ||
|
||
.facebook-btn{ | ||
background-color: $facebook-color; | ||
@extend %style-button; | ||
} | ||
|
||
.twitter-btn{ | ||
background-color: $twitter-color; | ||
@extend %style-button; | ||
} | ||
|
||
.twitter-btn:hover{ | ||
background-color: $twitter-color; | ||
} | ||
|
||
.facebook-btn:hover{ | ||
background-color: $facebook-color; | ||
} | ||
|
||
.google-btn:hover{ | ||
background-color: $google-color; | ||
} | ||
|
||
.email-input{ | ||
background-color: transparent; | ||
@extend %input-style; | ||
} | ||
|
||
.email-input:focus { | ||
background-color: transparent; | ||
box-shadow:none; | ||
@extend %input-style; | ||
} | ||
|
||
.email-addon{ | ||
@extend %input-style; | ||
} | ||
|
||
.transparent{ | ||
background-color: transparent; | ||
} | ||
|
||
.login-btn{ | ||
border-radius:25px; | ||
} | ||
|
||
.signup-btn{ | ||
color: $white; | ||
border-radius:25px; | ||
border: 1px solid $white; | ||
} | ||
|
||
.login-banner{ | ||
margin-top: 35%; | ||
} | ||
|
||
.welcome-text { | ||
font-weight: bold; | ||
font-size: 36px; | ||
} | ||
|
||
h2, h5, h4{ | ||
font-family: 'Zilla Slab'; | ||
} | ||
|
||
p{ | ||
font-family: 'Open Sans'; | ||
} |
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,15 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const Button = ({ link, className, buttonDisplay }) => ( | ||
<a href={link} className={className}>{buttonDisplay}</a> | ||
); | ||
|
||
Button.propTypes = { | ||
link: PropTypes.string.isRequired, | ||
className: PropTypes.string.isRequired, | ||
buttonDisplay: PropTypes.string.isRequired | ||
}; | ||
|
||
|
||
export default Button; |
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,19 @@ | ||
import React from 'react'; | ||
|
||
const LoginForm = () => ( | ||
<form> | ||
<div className="row mt-5 text-center"> | ||
<div className="col-md-8 offset-md-2"> | ||
<div className="input-group mb-3"> | ||
<div className="input-group-prepend"> | ||
<span className="input-group-text transparent email-addon" id="basic-addon1"><i className="far fa-envelope" /></span> | ||
</div> | ||
<input type="text" className="form-control email-input" placeholder="EMAIL ADDRESS" aria-label="Username" aria-describedby="basic-addon1" /> | ||
</div> | ||
<button type="submit" className="btn btn-outline-primary login-btn px-5 mt-5">LOGIN</button> | ||
</div> | ||
</div> | ||
</form> | ||
); | ||
|
||
export default LoginForm; |
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,39 @@ | ||
import React from 'react'; | ||
import SocialButton from './SocialButton'; | ||
import LoginForm from './LoginForm'; | ||
|
||
const LoginSection = () => ( | ||
|
||
<div className="col-md-8 login-form text-center order-md-1"> | ||
<h4>Sign in with your social media account</h4> | ||
{/* Button Div */} | ||
<div className="row mt-5"> | ||
|
||
<SocialButton | ||
className="btn btn-primary w-100 google-btn" | ||
socialButtonDisplay="Login with Google" | ||
socialIcon="fab fa-google mr-2" | ||
/> | ||
<SocialButton | ||
className="btn btn-primary w-100 facebook-btn" | ||
socialButtonDisplay="Login with Facebook" | ||
socialIcon="fab fa-facebook-f mr-2" | ||
/> | ||
<SocialButton | ||
className="btn btn-primary w-100 twitter-btn" | ||
socialButtonDisplay="Login with Twitter" | ||
socialIcon="fab fa-twitter mr-2" | ||
/> | ||
|
||
</div> | ||
{/* End of button div */} | ||
|
||
{/* Email input div */} | ||
<h5>Sign in with your email</h5> | ||
<LoginForm /> | ||
{/* End of Email input */} | ||
|
||
</div> | ||
); | ||
|
||
export default LoginSection; |
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,18 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const SocialButton = ({ className, socialButtonDisplay, socialIcon }) => ( | ||
<div className="col-lg-4 mt-3"> | ||
<button type="button" className={className}> | ||
<i className={socialIcon} /> | ||
{socialButtonDisplay} | ||
</button> | ||
</div> | ||
); | ||
SocialButton.propTypes = { | ||
className: PropTypes.string.isRequired, | ||
socialButtonDisplay: PropTypes.string.isRequired, | ||
socialIcon: PropTypes.string.isRequired | ||
}; | ||
|
||
export default SocialButton; |
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 Button from './Button'; | ||
|
||
const WelcomeSection = () => ( | ||
<div className="col-md-4 signup text-center order-md-2"> | ||
<div className="row welcome-banner align-items-center"> | ||
<div className="col-md-12 mt-5"> | ||
<h2 className="welcome-text">Welcome back!</h2> | ||
<p className="text-center mt-5">To keep sharing your exciting Ideas please log in into your account</p> | ||
</div> | ||
</div> | ||
|
||
<div className="row login-banner"> | ||
<div className="col-md-12"> | ||
<p className="mt-5">dont have an account yet?</p> | ||
|
||
<Button | ||
link="/signup" | ||
className="btn btn-outline-primary signup-btn px-5" | ||
buttonDisplay="SIGNUP" | ||
/> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default WelcomeSection; |
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,9 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import Button from '../../../../src/components/login/Button'; | ||
|
||
test('Login button snapshot test', () => { | ||
const component = shallow(<Button link="/login" className="some-style" buttonDisplay="login" />); | ||
expect(component).toMatchSnapshot(); | ||
}); |
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,9 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import LoginForm from '../../../../src/components/login/LoginForm'; | ||
|
||
test('Login formn snapshot test', () => { | ||
const component = shallow(<LoginForm />); | ||
expect(component).toMatchSnapshot(); | ||
}); |
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,9 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import LoginSection from '../../../../src/components/login/LoginSection'; | ||
|
||
test('Login section snapshot test', () => { | ||
const component = shallow(<LoginSection />); | ||
expect(component).toMatchSnapshot(); | ||
}); |
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,14 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import SocialButton from '../../../../src/components/login/SocialButton'; | ||
|
||
test('Login SocialButton snapshot test', () => { | ||
const component = shallow( | ||
<SocialButton | ||
className="some-styles" | ||
socialButtonDisplay="login with twitter" | ||
socialIcon="flying-bed" /> | ||
); | ||
expect(component).toMatchSnapshot(); | ||
}); |
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,9 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import WelcomeSection from '../../../../src/components/login/WelcomeSection'; | ||
|
||
test('Login Welcome-back section snapshot test', () => { | ||
const component = shallow(<WelcomeSection />); | ||
expect(component).toMatchSnapshot(); | ||
}); |