generated from goitacademy/react-homework-template
-
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.
- Loading branch information
1 parent
9531f92
commit d6b2a2e
Showing
8 changed files
with
169 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,7 @@ | ||
import { Wrapper } from './Home.styled'; | ||
|
||
const Home = () => { | ||
return <Wrapper>Welcome to the tweets site!</Wrapper>; | ||
}; | ||
|
||
export default Home; |
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,26 @@ | ||
import styled from "@emotion/styled"; | ||
|
||
export const Wrapper = styled.h1` | ||
font-size: 2.5rem; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
margin-right: -50%; | ||
transform: translate(-50%, -50%); | ||
text-align: center; | ||
color: #333; | ||
margin-bottom: 2rem; | ||
animation: fadeIn 2s ease-in-out; | ||
@keyframes fadeIn { | ||
0% { | ||
opacity: 0; | ||
transform: translateY(-20px); | ||
} | ||
100% { | ||
opacity: 1; | ||
transform: translateY(0); | ||
transform: translate(-50%, -50%); | ||
} | ||
} | ||
`; |
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,22 @@ | ||
import { Outlet } from 'react-router-dom'; | ||
import { AppNav, NavItem, NavLinkStyled, NavLinks } from './Layout.styled'; | ||
|
||
const Layout = () => { | ||
return ( | ||
<> | ||
<AppNav> | ||
<NavLinks> | ||
<NavItem> | ||
<NavLinkStyled to="/">Home</NavLinkStyled> | ||
</NavItem> | ||
<NavItem> | ||
<NavLinkStyled to="/tweets">Tweets</NavLinkStyled> | ||
</NavItem> | ||
</NavLinks> | ||
</AppNav> | ||
<Outlet /> | ||
</> | ||
); | ||
}; | ||
|
||
export default Layout; |
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,8 @@ | ||
import React from 'react'; | ||
import { StyledButton } from './MainButton.styled'; | ||
|
||
const MainButton = ({ to }) => { | ||
return <StyledButton to={to}> main</StyledButton>; | ||
}; | ||
|
||
export default MainButton; |
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,30 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import { NavLink } from 'react-router-dom'; | ||
|
||
export const StyledButton = styled(NavLink)` | ||
background-color: #4caf50; | ||
border: none; | ||
color: white; | ||
padding: 0.8rem 1.5rem; | ||
text-align: center; | ||
text-decoration: none; | ||
display: block; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
transition: background-color 0.2s ease-in-out; | ||
margin: 10px; | ||
margin-right: auto; | ||
font-family: 'Montserrat'; | ||
font-style: normal; | ||
font-weight: 600; | ||
font-size: 18px; | ||
line-height: 22px; | ||
text-transform: uppercase; | ||
width: 50px; | ||
&:hover { | ||
background-color: #3e8e41; | ||
color: white; | ||
} | ||
`; |