generated from UnBArqDsw2022-2/RepositorioTemplate
-
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.
[feat](#80) Add Cadastrar Imovel Page
Co-authored-by: MarianaPRio <[email protected]>
- Loading branch information
1 parent
0eac2e9
commit 003ef5d
Showing
3 changed files
with
108 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { useState } from "react"; | ||
import { Link, useNavigate } from "react-router-dom"; | ||
import { Page, Container, Title, Form, ButtonDiv, SmallInput } from './style'; | ||
import { Input } from "../../Components/Input"; | ||
import { CustomButton } from "../../Components/CustomButton"; | ||
|
||
const CreateBuilding = () => { | ||
const navigate = useNavigate(); | ||
|
||
const [cpfProprietario, setCpfProprietario] = useState(''); | ||
const [informacao, setInformacao] = useState(''); | ||
|
||
return ( | ||
<Page> | ||
<Container> | ||
<Title>Adicionar Imóvel ao Condomínio</Title> | ||
<Form> | ||
<SmallInput> | ||
<Input label = "CPF do Proprietário" | ||
type = "text" | ||
setText = {setCpfProprietario} | ||
value = {cpfProprietario} | ||
size = "100%" | ||
/> | ||
</SmallInput> | ||
<SmallInput> | ||
<Input label = "Informação Complementar" | ||
type = "text" | ||
setText = {setInformacao} | ||
value = {informacao} | ||
size="100%" | ||
/> | ||
</SmallInput> | ||
</Form> | ||
<ButtonDiv> | ||
<CustomButton | ||
label="Voltar" | ||
color="inherit" | ||
onClick={() => navigate('/')} | ||
/> | ||
<CustomButton | ||
label="Cadastrar" | ||
color="primary" | ||
onClick={() => { | ||
alert('Cadastrou'); | ||
navigate('/cadastrar-imovel') | ||
}} | ||
/> | ||
</ButtonDiv> | ||
</Container> | ||
</Page> | ||
); | ||
} | ||
|
||
export { CreateBuilding }; |
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,51 @@ | ||
import styled from "styled-components"; | ||
|
||
const Page = styled.div` | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
justify-content: center; | ||
align-items: center; | ||
background: white; | ||
`; | ||
|
||
const Container = styled.div` | ||
background-color: white; | ||
display: flex; | ||
width: 40%; | ||
height: 40%; | ||
justify-content: flex-start; | ||
align-items: center; | ||
flex-direction: column; | ||
padding: 1rem; | ||
`; | ||
|
||
const Form = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
gap: 1rem; | ||
margin-top: 2rem; | ||
box-sizing: border-box; | ||
`; | ||
|
||
const Title = styled.h1` | ||
margin: 0; | ||
`; | ||
|
||
const SmallInput = styled.div` | ||
width: 100%; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
`; | ||
|
||
const ButtonDiv = styled.div` | ||
margin-top: 1rem; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
`; | ||
|
||
export { Page, Container, Form, Title, SmallInput, ButtonDiv }; |
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