-
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.
Merge pull request #118 from 90lucasgabriel/feature/WJ-117
WJ-117 - Create login alert modal
- Loading branch information
Showing
20 changed files
with
454 additions
and
197 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,54 @@ | ||
import React, { useCallback } from 'react'; | ||
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, | ||
} from './styles'; | ||
|
||
const LoginAlert: React.FC<any> = () => { | ||
const history = useHistory(); | ||
const { dismissModal } = useModal(); | ||
|
||
const handleClose = useCallback(() => { | ||
dismissModal(); | ||
}, [dismissModal]); | ||
|
||
return ( | ||
<Container> | ||
<ImageContainer> | ||
<HeartImage /> | ||
</ImageContainer> | ||
<MessageContainer> | ||
<Message>Entre com sua conta para adicionar aos favoritos.</Message> | ||
</MessageContainer> | ||
<ButtonsContainer> | ||
<Button | ||
type="button" | ||
variant="basic" | ||
theme="secondary" | ||
onClick={handleClose} | ||
> | ||
CONTINUAR SEM LOGIN | ||
</Button> | ||
<Button | ||
type="button" | ||
theme="secondary" | ||
onClick={() => history.push(Route.LOGIN)} | ||
> | ||
LOGIN / CADASTRO | ||
</Button> | ||
</ButtonsContainer> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default LoginAlert; |
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 styled from 'styled-components'; | ||
import { Size } from 'shared/enums'; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: ${Size.Default}; | ||
padding-top: 0; | ||
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.Large} ${Size.Default}; | ||
text-align: center; | ||
`; | ||
|
||
export const Message = styled.h3``; | ||
|
||
export const ButtonsContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
@media (min-width: 715px) { | ||
flex-direction: row; | ||
} | ||
`; |
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
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.