Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 99 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"dependencies": {
"@testing-library/user-event": "^14.5.2",
"react": "^18.2.0",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"styled-components": "^6.1.11"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.6",
Expand Down
67 changes: 67 additions & 0 deletions src/components/Form-style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import styled from "styled-components";

export const Form = styled.form`

display: flex;
flex-direction: column;
align-items: center;
margin-top: 30px;
padding: 15px 0;

border-radius: 5px;
border: 1px solid #353535;
background-color: var(--bg-section-color);
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25);

input, textarea {
padding: 10px;
width: 90%;
color: #fff;
background-color: var(--form-input-data);

border-radius: 10px;
margin-bottom: 10px;
border: none;
}

textarea {
min-width: 90%;
max-width: 90%;
min-height: 60px;
max-height: 150px;
}

input::placeholder, textarea::placeholder {
color: #9F9F9F;
}

input:focus, textarea:focus {
outline: none;
}

.buttons-wrapper {
width: 90%;
display: flex;
align-items: center;
justify-content: end;

margin-top: 35px;
}

a {
color: #494949;
margin-right: 10px;
}

button {
background-color: #5F5F5F;
border: none;
border-radius: 8px;
padding: 12px;
display: inline;

color: #343434;
width: 20%;

}
`;
13 changes: 8 additions & 5 deletions src/components/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

import slcImage from '../assets/images/slcImage.svg';
import { Form as StyleForm } from './Form-style';

export default function Form() {
return (
<div>
<form>

<StyleForm>
<label htmlFor="imgUpload">
<img id="test" src={slcImage} alt="Selecionar imagem"/>
</label>
Expand All @@ -14,9 +15,11 @@ export default function Form() {
<input type="text" placeholder="Digite seu nome" />
<textarea placeholder="Mensagem"></textarea>

<a href="#">Descartar</a>
<button type="submit">Publicar</button>
</form>
<div className="buttons-wrapper">
<a href="#">Descartar</a>
<button type="submit">Publicar</button>
</div>
</StyleForm>
</div>
);
}
29 changes: 25 additions & 4 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
:root {
--primary-color: #7001FD;
--secondary-color: #1E2772;
--light-grey: #C2C2C2;
--dark-grey: #555555;
--bg-main-color: #343434;
--bg-section-color: #313131;
--light-grey: #9F9F9F;


/*Form*/
--form-input-data: #494949;

}

* {
Expand All @@ -11,4 +15,21 @@
box-sizing: border-box;

font-family: 'Inter', 'Roboto', sans-serif;
color: #fff;
}

main {
background-color: var(--bg-main-color);
position: absolute;

padding: 0 20px;
width: 100vw;
height: 100vh;
}

/* Larger screens */
@media screen and (min-width: 768px) {
main {
padding: 0 30vw;
}
}
1 change: 1 addition & 0 deletions src/pages/feed/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function App() {
return (
<main>
<Form />

</main>
)
}
Expand Down