Skip to content

Instantly share code, notes, and snippets.

@chunkydotdev
Created March 9, 2022 14:37
Show Gist options
  • Save chunkydotdev/99fdd323c137d2894825a775f04656a5 to your computer and use it in GitHub Desktop.
Save chunkydotdev/99fdd323c137d2894825a775f04656a5 to your computer and use it in GitHub Desktop.
Fishbubble in typescript
import styled from 'styled-components'
const FishBubble = styled.div<{ x: number; y: number }>`
top: ${({ y }) => y}%;
left: ${({ x }) => x}px;
position: absolute;
height: 4px;
width: 4px;
background-color: white;
animation: up 1.5s linear forwards;
@keyframes up {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(-200px);
opacity: 0;
}
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment