-
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 #45 from expfig/develop
Develop
- Loading branch information
Showing
34 changed files
with
1,371 additions
and
110 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
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
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,4 @@ | ||
/** | ||
* EXPORTS | ||
*/ | ||
export * from "./modal-aprovation"; |
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 @@ | ||
/** | ||
* IMPORTS | ||
*/ | ||
|
||
interface ModalAprovationProps { | ||
isModalOpen: boolean; | ||
isLoading: boolean; | ||
onAprovationDocumentAndCoil: () => void; | ||
onOpenAndClosedClick: () => void; | ||
} | ||
|
||
/** | ||
* EXPORTS | ||
*/ | ||
export type { ModalAprovationProps }; |
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,93 @@ | ||
/** | ||
* IMPORTS | ||
*/ | ||
import { useTheme } from "styled-components"; | ||
import { FiX } from "react-icons/fi"; | ||
|
||
// components | ||
import { Button } from "../button"; | ||
import { Modal } from "../modal"; | ||
import { Text } from "../text"; | ||
|
||
// typings | ||
import { type ModalAprovationProps } from "./interface"; | ||
|
||
// styles | ||
import { | ||
WrapperHeader, | ||
WrapperHeaderTitle, | ||
ButtonClosed, | ||
WrapperTextDescriptionModal, | ||
WrapperButtonModal, | ||
SubTitle, | ||
} from "./modal-styles"; | ||
|
||
const ModalAprovation = ({ | ||
isModalOpen, | ||
onOpenAndClosedClick, | ||
onAprovationDocumentAndCoil, | ||
isLoading = false, | ||
}: ModalAprovationProps) => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<Modal isOpen={isModalOpen} onRequestCloseClick={onOpenAndClosedClick}> | ||
<WrapperHeader> | ||
<WrapperHeaderTitle> | ||
<Text | ||
text="APROVAÇÃO DE DOCUMENTO" | ||
align="center" | ||
letterHeight={24} | ||
letterSpacing={0.5} | ||
color={theme.colors.black_200} | ||
size={18} | ||
weight="600" | ||
/> | ||
</WrapperHeaderTitle> | ||
|
||
<ButtonClosed> | ||
<FiX | ||
color={theme.colors.black_200} | ||
size={24} | ||
onClick={onOpenAndClosedClick} | ||
/> | ||
</ButtonClosed> | ||
</WrapperHeader> | ||
|
||
<WrapperTextDescriptionModal> | ||
<SubTitle> | ||
{isLoading | ||
? "Aprovando documento..." | ||
: "Você tem certeza que deseja aprovar o documento/foto selecionada?"} | ||
</SubTitle> | ||
</WrapperTextDescriptionModal> | ||
|
||
<WrapperButtonModal> | ||
<Button | ||
onClick={onOpenAndClosedClick} | ||
width={"46%"} | ||
weight={600} | ||
title="Cancelar" | ||
backgroundColor={theme.colors.red_500} | ||
color={theme.colors.natural} | ||
loading={false} | ||
/> | ||
|
||
<Button | ||
onClick={onAprovationDocumentAndCoil} | ||
width={"46%"} | ||
weight={600} | ||
title="Sim, tenho certeza!" | ||
backgroundColor={theme.colors.green_200} | ||
color={theme.colors.natural} | ||
loading={isLoading} | ||
/> | ||
</WrapperButtonModal> | ||
</Modal> | ||
); | ||
}; | ||
|
||
/** | ||
* EXPORTS | ||
*/ | ||
export { ModalAprovation }; |
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,105 @@ | ||
/** | ||
* IMPORTS | ||
*/ | ||
import styled from "styled-components"; | ||
|
||
const WrapperHeader = styled.div` | ||
width: 100%; | ||
height: 2.4rem; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
@media screen and (max-width: 768px) { | ||
width: 100%; | ||
} | ||
`; | ||
|
||
const WrapperHeaderTitle = styled.div` | ||
width: 100%; | ||
display: flex; | ||
align-items: flex-end; | ||
justify-content: flex-end; | ||
@media screen and (max-width: 968px) { | ||
width: 100%; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
@media screen and (max-width: 768px) { | ||
width: 100%; | ||
} | ||
`; | ||
|
||
const SubTitle = styled.p` | ||
font-size: 18px; | ||
width: 60%; | ||
text-align: center; | ||
color: ${({ theme }) => theme.colors.gray_500}; | ||
line-height: 28px; | ||
letter-spacing: 0.5; | ||
@media screen and (max-width: 768px) { | ||
font-size: 1rem; | ||
width: 100%; | ||
} | ||
`; | ||
|
||
const ButtonClosed = styled.button` | ||
width: 3.12rem; | ||
height: 3.12rem; | ||
border-radius: 1.62rem; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
const WrapperTextDescriptionModal = styled.div` | ||
width: 100%; | ||
height: 4.38rem; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin-top: 1rem; | ||
margin-bottom: auto; | ||
border-top: 1px solid ${({ theme }) => theme.colors.gray_350}; | ||
border-bottom: 1px solid ${({ theme }) => theme.colors.gray_350}; | ||
@media screen and (max-width: 968px) { | ||
background-color: transparent; | ||
height: 6rem; | ||
} | ||
@media screen and (max-width: 768px) { | ||
background-color: transparent; | ||
height: 5.38rem; | ||
} | ||
`; | ||
|
||
const WrapperButtonModal = styled.div` | ||
width: 100%; | ||
height: 4.38rem; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-top: 2rem; | ||
padding: 0 1rem; | ||
@media screen and (max-width: 768px) { | ||
height: 6rem; | ||
flex-direction: column; | ||
} | ||
`; | ||
|
||
/** | ||
* EXPORTS | ||
*/ | ||
export { | ||
WrapperHeader, | ||
WrapperHeaderTitle, | ||
SubTitle, | ||
ButtonClosed, | ||
WrapperTextDescriptionModal, | ||
WrapperButtonModal, | ||
}; |
18 changes: 18 additions & 0 deletions
18
src/components/modal-fail-approval/data-mocked/data-mocked.ts
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 @@ | ||
/** | ||
* IMPORTS | ||
*/ | ||
|
||
const options = [ | ||
{ | ||
value: "Bobina com número não correspondente", | ||
label: "Bobina com número não correspondente", | ||
}, | ||
{ value: "Foto Borrada", label: "Foto Borrada" }, | ||
{ value: "Image embaçada", label: "Image embaçada" }, | ||
{ value: "Nenhuma das opção abaixo", label: "Nenhuma das opção abaixo" }, | ||
]; | ||
|
||
/** | ||
* EXPORTS | ||
*/ | ||
export { options }; |
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,4 @@ | ||
/** | ||
* EXPORTS | ||
*/ | ||
export * from "./modal-fail-approval"; |
Oops, something went wrong.