Skip to content

Commit

Permalink
WJ-117 - New: Image login favorite alert;
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Teixeira committed Nov 15, 2020
1 parent f50de37 commit 815e4c8
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 20 deletions.
53 changes: 53 additions & 0 deletions src/assets/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions src/assets/login.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/LoginAlert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { useHistory } from 'react-router-dom';

import Route from 'routes/enums';

import { ReactComponent as HeartImage } from 'assets/heart.svg';
import { useModal } from 'components/Modal/hooks';
import { Button } from 'components';
import {
Container,
ImageContainer,
MessageContainer,
Message,
ButtonsContainer,
Expand All @@ -22,6 +24,9 @@ const LoginAlert: React.FC<any> = () => {

return (
<Container>
<ImageContainer>
<HeartImage />
</ImageContainer>
<MessageContainer>
<Message>Entre com sua conta para adicionar aos favoritos.</Message>
</MessageContainer>
Expand Down
14 changes: 12 additions & 2 deletions src/components/LoginAlert/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ export const Container = styled.div`
width: min(550px, calc(100vw - 5rem));
`;

export const ImageContainer = styled.div`
display: flex;
align-items: center;
justify-content: center;
svg {
width: min(300px, 100%);
height: auto;
}
`;

export const MessageContainer = styled.div`
padding: ${Size.Default};
padding-top: 0;
padding: ${Size.Large} ${Size.Default};
text-align: center;
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const ModalContainer = styled.div<StyleProps>`
export const ModalContent = styled.div`
display: flex;
flex-direction: column;
box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.3);
box-shadow: 0 4px 7px 1px rgba(0, 0, 0, 0.3);
margin: 10px;
margin-top: 0;
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Login: React.FC = () => {
return (
<ColumnLayout>
<HeaderContainer>
<Header background={Color.Transparent} color={Color.Primary} />
<Header background={Color.Transparent} color={Color.Secondary} />
</HeaderContainer>
<Container>
<RowContainer>
Expand All @@ -88,7 +88,7 @@ const Login: React.FC = () => {
placeholder="Senha"
/>
<ErrorMessage data-testid="errorMessage">{error}</ErrorMessage>
<Button type="submit" loading={loginLoading}>
<Button type="submit" loading={loginLoading} theme="secondary">
ENTRAR
</Button>
</LoginForm>
Expand All @@ -102,15 +102,15 @@ const Login: React.FC = () => {
<Button
type="button"
variant="outlined"
theme="primary"
theme="secondary"
onClick={() => history.push(Route.SIGNUP)}
>
CRIAR CONTA
</Button>
</SignupContainer>
</RowContainer>
</Container>
<Footer />
<Footer theme="secondary" />
</ColumnLayout>
);
};
Expand Down
10 changes: 5 additions & 5 deletions src/pages/Login/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ export const LoginHeader = styled.h1`
margin-bottom: ${Size.Large};
font-size: ${Size.Large};
font-weight: 400;
color: ${Color.Primary};
color: ${Color.Secondary};
`;

export const ErrorMessage = styled.p`
margin: ${Size.Default} 0;
color: ${Color.Primary};
color: ${Color.Secondary};
font-size: ${Size.Small};
`;

Expand All @@ -68,7 +68,7 @@ export const SignupContainer = styled.div`
flex-direction: column;
align-items: center;
justify-content: center;
color: ${Color.Primary};
color: ${Color.Secondary};
text-align: center;
padding: ${Size.Default};
flex: 1 1 458px;
Expand All @@ -82,12 +82,12 @@ export const SignupHeader = styled.h1`
margin-bottom: ${Size.Large};
font-size: ${Size.Large};
font-weight: 400;
color: ${Color.Primary};
color: ${Color.Secondary};
`;

export const SignupDescription = styled.p`
margin-bottom: ${Size.Large};
font-size: ${Size.Default};
font-weight: 100;
color: ${Color.Primary};
color: ${Color.Secondary};
`;
8 changes: 4 additions & 4 deletions src/pages/Signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Signup: React.FC = () => {
return (
<ColumnLayout>
<HeaderContainer>
<Header background={Color.Transparent} color={Color.Primary} />
<Header background={Color.Transparent} color={Color.Secondary} />
</HeaderContainer>
<Container>
<RowContainer>
Expand All @@ -89,7 +89,7 @@ const Signup: React.FC = () => {
placeholder="Senha"
/>
<ErrorMessage>{error}</ErrorMessage>
<Button type="submit" loading={signupLoading}>
<Button type="submit" loading={signupLoading} theme="secondary">
CADASTRAR
</Button>
</SignupForm>
Expand All @@ -103,15 +103,15 @@ const Signup: React.FC = () => {
<Button
type="button"
variant="outlined"
theme="primary"
theme="secondary"
onClick={() => history.push(Route.LOGIN)}
>
LOGIN
</Button>
</LoginContainer>
</RowContainer>
</Container>
<Footer />
<Footer theme="secondary" />
</ColumnLayout>
);
};
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Signup/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ export const SignupHeader = styled.h1`
margin-bottom: ${Size.Large};
font-size: ${Size.Large};
font-weight: 400;
color: ${Color.Primary};
color: ${Color.Secondary};
`;

export const ErrorMessage = styled.p`
margin: ${Size.Default} 0;
color: ${Color.Primary};
color: ${Color.Secondary};
font-size: ${Size.Small};
`;

Expand All @@ -81,12 +81,12 @@ export const LoginHeader = styled.h1`
margin-bottom: ${Size.Large};
font-size: ${Size.Large};
font-weight: 400;
color: ${Color.Primary};
color: ${Color.Secondary};
`;

export const LoginDescription = styled.p`
margin-bottom: ${Size.Large};
font-size: ${Size.Default};
font-weight: 100;
color: ${Color.Primary};
color: ${Color.Secondary};
`;

0 comments on commit 815e4c8

Please sign in to comment.