Skip to content

Commit

Permalink
remove css media query and add bootstrap class for responsive LoginPa…
Browse files Browse the repository at this point in the history
…nel component
  • Loading branch information
jitendrasbunde committed May 25, 2020
1 parent 6720926 commit a4aaaa0
Showing 1 changed file with 18 additions and 30 deletions.
48 changes: 18 additions & 30 deletions react-frontend/src/login/LoginPanel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Row } from "react-bootstrap";
import { Col } from "react-bootstrap";
import PropTypes from "prop-types";
import { AiOutlineMail } from "react-icons/ai";
import Styled from "styled-components";
Expand All @@ -10,23 +10,10 @@ import LoginTextComponent from "shared-components/login-text-component/LoginText

const Wrapper = Styled.div`
background: #334856;
height: auto
`;
const FirstRow = Styled(Row)`
const FirstCol = Styled(Col)`
font: Helvetica Neue,Regular;
padding-top: 1rem;
height: 33.33%;
`;
const SecondRow = Styled(Row)`
height: 33.33%;
@media (max-width: 769px) {
height: 55.5%;
}
`;
const ThirdRow = Styled(Row)`
@media (min-width: 767px) {
height: 33.33%;
}
`;
const SignInButtonComponent = Styled(ButtonComponent)`
border-radius: 25px;
Expand All @@ -36,34 +23,35 @@ const LoginPanel = ({
buttonText,
orgPrimaryCoreValue,
encouragementThought,
onClick,
}) => (
<Wrapper className="h-100 align-items-center">
<FirstRow className="h1">
<Wrapper className="h-100 align-items-center d-flex flex-column">
<FirstCol className="h1">
<LogoComponent />
</FirstRow>
<SecondRow className="align-items-center d-flex justify-content-center">
</FirstCol>
<Col className="align-items-center d-flex justify-content-center ">
<SignInButtonComponent
className="btn-light "
className="btn-light"
icon={<AiOutlineMail fontSize={15} />}
text={buttonText}
onClick={onClick}
/>
</Col>
<Col className="d-none d-md-block d-lg-block">
<LoginTextComponent
className="text-white text-center "
orgPrimaryCoreValue={orgPrimaryCoreValue}
encouragementThought={encouragementThought}
/>
</SecondRow>
<div className="d-none d-md-block ">
<ThirdRow>
<LoginTextComponent
className="text-white text-center "
orgPrimaryCoreValue={orgPrimaryCoreValue}
encouragementThought={encouragementThought}
/>
</ThirdRow>
</div>
</Col>
</Wrapper>
);

LoginPanel.propTypes = {
buttonText: PropTypes.string,
orgPrimaryCoreValue: PropTypes.string,
encouragementThought: PropTypes.string,
onClick: PropTypes.func.isRequired,
};

LoginPanel.defaultProps = {
Expand Down

0 comments on commit a4aaaa0

Please sign in to comment.