generated from UnBArqDsw2021-1/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.
(#5) Corrigindo erros do prettier no projeto
Co-authored-by: Emily Sousa <diassousa@yahoo.com.br>
- Loading branch information
1 parent
9f55284
commit 7cb2fba
Showing
6 changed files
with
178 additions
and
165 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 |
---|---|---|
@@ -1,32 +1,30 @@ | ||
import React from "react"; | ||
import React from 'react'; | ||
|
||
import GlobalStyle from "styles/global"; | ||
import GlobalStyle from 'styles/global'; | ||
|
||
import NavBar from "components/NavBar"; | ||
import Loading from "components/Loading"; | ||
import MenuItem from "components/MenuItem"; | ||
import NavBar from 'components/NavBar'; | ||
import Loading from 'components/Loading'; | ||
import MenuItem from 'components/MenuItem'; | ||
|
||
const App: React.FC = () => { | ||
return ( | ||
<> | ||
<NavBar /> | ||
<MenuItem | ||
id={0} | ||
image={ | ||
"https://blog.finamac.com/wp-content/uploads/2019/10/309956-como-oferecer-os-melhores-sabores-de-milkshake-para-os-clientes-1280x640.jpg" | ||
} | ||
name={"Milkshake"} | ||
price={"16.90"} | ||
discount={0} | ||
description={ | ||
"Disponível nos sabores morango, chocolate, oreo e creme de\ | ||
avelã." | ||
} | ||
/> | ||
<Loading /> | ||
<GlobalStyle /> | ||
</> | ||
); | ||
return ( | ||
<> | ||
<NavBar /> | ||
<MenuItem | ||
id={0} | ||
image="https://blog.finamac.com/wp-content/uploads/2019/10/309956-como-oferecer-os-melhores-sabores-de-milkshake-para-os-clientes-1280x640.jpg" | ||
name="Milkshake" | ||
price="16.90" | ||
discount={0} | ||
description={ | ||
'Disponível nos sabores morango, chocolate, oreo e creme de\ | ||
avelã.' | ||
} | ||
/> | ||
<Loading /> | ||
<GlobalStyle /> | ||
</> | ||
); | ||
}; | ||
|
||
export default App; |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from "react"; | ||
import React from 'react'; | ||
|
||
import { LoadingContainer } from "components/Loading/styles"; | ||
import { LoadingContainer } from 'components/Loading/styles'; | ||
|
||
const Loading: React.FC = () => { | ||
return ( | ||
<LoadingContainer> | ||
<div /> | ||
</LoadingContainer> | ||
); | ||
return ( | ||
<LoadingContainer> | ||
<div /> | ||
</LoadingContainer> | ||
); | ||
}; | ||
|
||
export default Loading; |
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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
import styled from "styled-components"; | ||
import styled from 'styled-components'; | ||
|
||
export const LoadingContainer = styled.div` | ||
div, | ||
div:before, | ||
div:after { | ||
background: transparent; | ||
animation: load1 1s infinite ease-in-out; | ||
width: 1em; | ||
height: 4em; | ||
div, | ||
div:before, | ||
div:after { | ||
background: transparent; | ||
animation: load1 1s infinite ease-in-out; | ||
width: 1em; | ||
height: 4em; | ||
} | ||
div { | ||
color: black; | ||
text-indent: -9999em; | ||
margin: 88px auto; | ||
margin-top: 20rem; | ||
position: relative; | ||
font-size: 3rem; | ||
transform: translateZ(0); | ||
animation-delay: -0.16s; | ||
} | ||
div:before, | ||
div:after { | ||
position: absolute; | ||
top: 0; | ||
content: ''; | ||
} | ||
div:before { | ||
left: -1.5em; | ||
animation-delay: -0.32s; | ||
} | ||
div:after { | ||
left: 1.5em; | ||
} | ||
@keyframes load1 { | ||
0%, | ||
80%, | ||
100% { | ||
box-shadow: 0 0; | ||
height: 4em; | ||
} | ||
div { | ||
color: black; | ||
text-indent: -9999em; | ||
margin: 88px auto; | ||
margin-top: 20rem; | ||
position: relative; | ||
font-size: 3rem; | ||
transform: translateZ(0); | ||
animation-delay: -0.16s; | ||
} | ||
div:before, | ||
div:after { | ||
position: absolute; | ||
top: 0; | ||
content: ""; | ||
} | ||
div:before { | ||
left: -1.5em; | ||
animation-delay: -0.32s; | ||
} | ||
div:after { | ||
left: 1.5em; | ||
} | ||
@keyframes load1 { | ||
0%, | ||
80%, | ||
100% { | ||
box-shadow: 0 0; | ||
height: 4em; | ||
} | ||
40% { | ||
box-shadow: 0 -2em; | ||
height: 5em; | ||
} | ||
40% { | ||
box-shadow: 0 -2em; | ||
height: 5em; | ||
} | ||
} | ||
`; |
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 |
---|---|---|
@@ -1,36 +1,42 @@ | ||
import React from "react"; | ||
import React from 'react'; | ||
|
||
import { MenuItemContainer } from "components/MenuItem/styles"; | ||
import { MenuItemContainer } from 'components/MenuItem/styles'; | ||
|
||
interface IMenuItem { | ||
id: number; | ||
image: string; | ||
name: string; | ||
price: string; | ||
discount: number; | ||
description: string; | ||
} | ||
type Props = { | ||
id: number; | ||
image: string; | ||
name: string; | ||
price: string; | ||
discount: number; | ||
description: string; | ||
}; | ||
|
||
const MenuItem: React.FC<IMenuItem> = ({ | ||
id, | ||
image, | ||
name, | ||
price, | ||
discount, | ||
description, | ||
}: IMenuItem) => { | ||
//const addItem = ({ addItem } = useContext(ItemContext)); | ||
return ( | ||
<MenuItemContainer> | ||
<img src={image} alt={name} /> | ||
<div> | ||
<h4>{name}</h4> | ||
<p>{description}</p> | ||
<h5>R${price}</h5> | ||
<button onClick={() => {}}>Adicionar</button> | ||
</div> | ||
</MenuItemContainer> | ||
); | ||
const MenuItem: React.FC<Props> = ({ | ||
id, | ||
image, | ||
name, | ||
price, | ||
discount, | ||
description, | ||
}) => { | ||
// const addItem = ({ addItem } = useContext(ItemContext)); | ||
return ( | ||
<MenuItemContainer> | ||
<img src={image} alt={name} /> | ||
<div> | ||
<h4>{name}</h4> | ||
<p>{description}</p> | ||
<h5>R${price}</h5> | ||
<button | ||
onClick={() => { | ||
console.log('addItem here'); | ||
}} | ||
> | ||
Adicionar | ||
</button> | ||
</div> | ||
</MenuItemContainer> | ||
); | ||
}; | ||
|
||
export default MenuItem; |
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 |
---|---|---|
@@ -1,67 +1,67 @@ | ||
import styled from "styled-components"; | ||
import styled from 'styled-components'; | ||
|
||
export const MenuItemContainer = styled.div` | ||
width: 50%; | ||
height: 18em; | ||
margin: 5em; | ||
display: flex; | ||
flex-wrap: wrap; | ||
flex-direction: row; | ||
gap: 20px; | ||
border-radius: 0.5rem; | ||
box-shadow: 3px 4px 10px 1px #00000033; | ||
width: 50%; | ||
height: 18em; | ||
margin: 5em; | ||
display: flex; | ||
flex-wrap: wrap; | ||
flex-direction: row; | ||
gap: 20px; | ||
border-radius: 0.5rem; | ||
box-shadow: 3px 4px 10px 1px #00000033; | ||
img { | ||
flex: 30%; | ||
margin: 1.5em; | ||
max-width: 20em; | ||
max-height: 20em; | ||
border-radius: 15px; | ||
} | ||
img { | ||
flex: 30%; | ||
margin: 1.5em; | ||
max-width: 20em; | ||
max-height: 20em; | ||
border-radius: 15px; | ||
} | ||
div { | ||
flex: 60%; | ||
margin: 0; | ||
display: grid; | ||
grid-template-columns: 25% 25% 25% 6.25% 6.25% 6.25% 6.25%; | ||
grid-template-rows: auto; | ||
grid-template-areas: | ||
"name name name name name . ." | ||
"description description description . . . ." | ||
". . . . price price ." | ||
". . . button button button button"; | ||
div { | ||
flex: 60%; | ||
margin: 0; | ||
display: grid; | ||
grid-template-columns: 25% 25% 25% 6.25% 6.25% 6.25% 6.25%; | ||
grid-template-rows: auto; | ||
grid-template-areas: | ||
'name name name name name . .' | ||
'description description description . . . .' | ||
'. . . . price price .' | ||
'. . . button button button button'; | ||
h4 { | ||
grid-area: name; | ||
margin: 0; | ||
padding: 0; | ||
font-weight: bold; | ||
} | ||
h4 { | ||
grid-area: name; | ||
margin: 0; | ||
padding: 0; | ||
font-weight: bold; | ||
} | ||
p { | ||
grid-area: description; | ||
margin: 0; | ||
} | ||
p { | ||
grid-area: description; | ||
margin: 0; | ||
} | ||
h5 { | ||
margin: 0; | ||
grid-area: price; | ||
font-size: 1.5em; | ||
font-weight: bold; | ||
} | ||
h5 { | ||
margin: 0; | ||
grid-area: price; | ||
font-size: 1.5em; | ||
font-weight: bold; | ||
} | ||
button { | ||
margin: 0.5em; | ||
height: 2em; | ||
grid-area: button; | ||
margin-top: 0; | ||
border-radius: 30px; | ||
background: #8e3031; | ||
text-align: center; | ||
color: white; | ||
font-weight: bold; | ||
cursor: pointer; | ||
box-shadow: 3px 4px 10px 1px #00000033; | ||
} | ||
button { | ||
margin: 0.5em; | ||
height: 2em; | ||
grid-area: button; | ||
margin-top: 0; | ||
border-radius: 30px; | ||
background: #8e3031; | ||
text-align: center; | ||
color: white; | ||
font-weight: bold; | ||
cursor: pointer; | ||
box-shadow: 3px 4px 10px 1px #00000033; | ||
} | ||
} | ||
`; |
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