showing results for - "write hover animation for styled div"
Nele
09 Jul 2017
1import styled, { css } from 'styled-components'
2
3const AnimationContainer = styled.div`
4  transform: translate(0%);
5  transition: 0.3s ease-out;
6
7  ${props => props.animated && css`
8    &:hover {
9      position: fixed;
10      transform: translate(0%, -30%);
11      transition: 0.3s ease-out;
12    }
13  `}
14`
15
16export default AnimationContainer
17