-
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
aae3ec9
commit 2915c3a
Showing
12 changed files
with
105 additions
and
3 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
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,5 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "src" | ||
} | ||
} |
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 * as S from './styles' | ||
|
||
const Footer = () => { | ||
return <S.Wrapper>Made with [heart] by theandersonn</S.Wrapper> | ||
} | ||
|
||
export default Footer |
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,3 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Wrapper = styled.footer`` |
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,13 @@ | ||
import PropTypes from 'prop-types' | ||
|
||
import * as S from './styles' | ||
|
||
const Main = ({ children }) => { | ||
return <S.Wrapper>{children}</S.Wrapper> | ||
} | ||
|
||
Main.propTypes = { | ||
children: PropTypes.elementType.isRequired | ||
} | ||
|
||
export default Main |
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,3 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Wrapper = styled.main`` |
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,13 @@ | ||
import * as S from './styles' | ||
|
||
const ScreenResolution = () => { | ||
return ( | ||
<S.Wrapper> | ||
<h2>Screen Resolution is</h2> | ||
<p>Screen Width: {window.outerWidth} pixels</p> | ||
<p>Screen Height: {window.outerHeight} pixels</p> | ||
</S.Wrapper> | ||
) | ||
} | ||
|
||
export default ScreenResolution |
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,3 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Wrapper = styled.article`` |
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,35 @@ | ||
import { useEffect, useState } from 'react' | ||
|
||
import * as S from './styles' | ||
|
||
const ScreenSize = () => { | ||
const [dimensions, setDimensions] = useState({ | ||
height: window.innerHeight, | ||
width: window.innerWidth | ||
}) | ||
|
||
useEffect(() => { | ||
function handleResize() { | ||
setDimensions({ | ||
height: window.innerHeight, | ||
width: window.innerWidth | ||
}) | ||
} | ||
|
||
window.addEventListener('resize', handleResize) | ||
|
||
return () => { | ||
window.removeEventListener('resize', handleResize) | ||
} | ||
}) | ||
|
||
return ( | ||
<S.Wrapper> | ||
<h2>Screen Size is</h2> | ||
<p>Screen Width: {dimensions.width} pixels</p> | ||
<p>Screen Height: {dimensions.height} pixels</p> | ||
</S.Wrapper> | ||
) | ||
} | ||
|
||
export default ScreenSize |
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,3 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Wrapper = styled.article`` |