-
Notifications
You must be signed in to change notification settings - Fork 2
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
88a5d48
commit b5ce081
Showing
2 changed files
with
40 additions
and
20 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,38 @@ | ||
import React from "react" | ||
import styled from "styled-components" | ||
|
||
const VHSLine = styled.div` | ||
width: 100%; | ||
background: ${(props) => | ||
props.theme.name === "dark" ? "rgba(0, 0, 0, 0.2)" : "rgba(0, 0, 0, 0.08)"}; | ||
top: 4px; | ||
height: 2px; | ||
margin-bottom: 8px; | ||
position: relative; | ||
` | ||
|
||
const VHSContainer = styled.div` | ||
@keyframes moveLines { | ||
0% { | ||
transform: translateY(0px); | ||
} | ||
100% { | ||
transform: translateY(10px); | ||
} | ||
} | ||
margin-top: -20px; | ||
animation: moveLines 2s infinite linear; | ||
height: 400px; | ||
` | ||
|
||
function VHS() { | ||
return ( | ||
<VHSContainer> | ||
{[...new Array(30)].map(() => ( | ||
<VHSLine color="rgba(0,0,0,0.2)" /> | ||
))} | ||
</VHSContainer> | ||
) | ||
} | ||
|
||
export default VHS |