Skip to content

Commit a147a06

Browse files
committed
Add layout animation
1 parent 99fb430 commit a147a06

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function App() {
1616
return (
1717
<ThemeProvider theme={light}>
1818
<Container>
19-
<Content>
19+
<Content layout>
2020
<Header>
2121
<h2>Upload de Imagens</h2>
2222
<p>Imagens do tipo .png ou .jpg</p>

src/styles.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { motion } from 'framer-motion';
12
import styled from 'styled-components';
23

34
export const Container = styled.div`
@@ -7,7 +8,7 @@ export const Container = styled.div`
78
height: 100%;
89
`;
910

10-
export const Content = styled.main`
11+
export const Content = styled(motion.main)`
1112
display: flex;
1213
flex-direction: column;
1314
@@ -16,7 +17,10 @@ export const Content = styled.main`
1617
1718
max-width: 500px;
1819
19-
transition: all 2 ease;
20+
height: auto;
21+
max-height: 600px;
22+
23+
transition: height 2 ease;
2024
2125
margin: 30px;
2226
padding: 20px;

0 commit comments

Comments
 (0)