Skip to content

Commit

Permalink
Merge pull request #9 from Andresavieira28/master
Browse files Browse the repository at this point in the history
finalizando forms
  • Loading branch information
Andresavieira28 authored Feb 12, 2024
2 parents 0bb0c06 + 3fa89b0 commit 22c32ec
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 8 deletions.
Binary file added public/imagens/GitHub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/imagens/email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/imagens/linkedin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/imagens/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useState } from 'react';
import Banner from './componentes/Banner/banner';
import Form from './componentes/form/form'
import Time from './componentes/Time/time';
import Rodape from './componentes/rodape/rodape';

function App() {

const [colaboradores, setColaboradores] = useState([]);

const aoNovoColaboradorAdd = (colaborador) => {
console.log(colaborador);
setColaboradores ([...colaboradores,colaborador])
}

Expand Down Expand Up @@ -69,6 +69,8 @@ function App() {
corSecundaria={time.corSecundaria}
colaboradores={colaboradores.filter(colaborador => colaborador.time === time.nome)}
/>)}

<Rodape />
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/componentes/Banner/banner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './banner.css'

function Banner () {
//JSX
return (
<header className="banner">
<img src="/imagens/banner.png" alt="banner principal"/>
Expand Down
4 changes: 2 additions & 2 deletions src/componentes/Colaborador/colaborador.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import './colaborador.css'

const Colaborador = ({nome, imagem, cargo}) => {
const Colaborador = ({nome, imagem, cargo, corDeFundo}) => {
return(
<div className='colaborador'>
<div className='cabecalho'>
<div className='cabecalho' style={{backgroundColor:corDeFundo}}>
<img src={imagem} alt={nome} />
</div>
<div className='rodape'>
Expand Down
10 changes: 7 additions & 3 deletions src/componentes/ListaSuspensa/ListaSuspensa.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import "./ListaSuspensa.css"


const ListaSuspensa = (props) => {
console.log(props.itens)

return (
<div className="lista-suspensa">
<label>{props.label}</label>
<select onChange={e => props.aoAlterado(e.target.value)} required={props.required} value={props.value}>
<select onChange={e =>
props.aoAlterado(e.target.value)}
required={props.required}
value={props.valor}>

<option value="">Selecione o seu time</option>

{props.itens.map((item) => {
return <option key={item}>{item}</option>;
})}
Expand Down
5 changes: 4 additions & 1 deletion src/componentes/Time/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ const Time = (props) => {
const css = { backgroundColor: props.corSecundaria };

return (
<section className="time" style={css}>
(props.colaboradores.length > 0) ? <section className="time" style={css}>
<h3 style={{ borderColor: props.corPrimaria }}>{props.nome}</h3>
<div className="colaboradores">
{props.colaboradores.map((colaborador) => (
<Colaborador
corDeFundo={props.corPrimaria}
key={colaborador.nome}
nome={colaborador.nome}
cargo={colaborador.cargo}
imagem={colaborador.imagem}
/>
))}
</div>
</section>
: ''
);
};

Expand Down
6 changes: 5 additions & 1 deletion src/componentes/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const Formulario = (props) => {
imagem,
time
})
setNome('')
setCargo('')
setImagem('')
setTime('')
}

return (
Expand All @@ -41,7 +45,7 @@ const Formulario = (props) => {

<TextField
label="Imagem"
placeholder="Digite o endereço da sua imagem"
placeholder="Digite o endereço do seu GitHub + .png"
valor={imagem}
aoAlterado={valor => setImagem(valor)} />

Expand Down
17 changes: 17 additions & 0 deletions src/componentes/rodape/rodape.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.footer {
background: #6278F7;
color: #FFF;
padding: 15px;
display: flex;
justify-content: space-between;
align-items: center;
}

.footer ul li {
display: flex;
margin-right: 20px;
}

.footer ul li:last-child {
margin-right: 0;
}
35 changes: 35 additions & 0 deletions src/componentes/rodape/rodape.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import './rodape.css'

const Rodape = () => {
return (<footer className="footer">
<section>
<ul >
<li>
<a href="https://github.com/Andresavieira28" target="_blank" rel="noreferrer">
<img src="imagens/GitHub.png" alt="link1" />
</a>
</li>
<li>
<a href="https://www.linkedin.com/in/andresa-vieira/" target="_blank" rel="noreferrer">
<img src="imagens/linkedin.png" alt="link2" />
</a>
</li>
<li>
<a href="https://mail.google.com/mail/u/0/?tab=rm&ogbl#inbox" target="_blank" rel="noreferrer">
<img src="imagens/email.png" alt="link3" />
</a>
</li>
</ul>
</section>
<section>
<img src="/imagens/logo.png" alt="logo" />
</section>
<section>
<p>
Desenvolvido por <a href='https://www.linkedin.com/in/andresa-vieira/'>Andresa Vieira</a>
</p>
</section>
</footer>)
}

export default Rodape

0 comments on commit 22c32ec

Please sign in to comment.