Created
February 8, 2020 20:53
-
-
Save DZuz14/7606d6ab1f0ead0ee707cc86631d0862 to your computer and use it in GitHub Desktop.
Slider with React Hooks 3
This file contains hidden or 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
import React from 'react' | |
import styled from '@emotion/styled' | |
const SliderContent = styled.div` | |
transform: translateX(-${props => props.translate}px); | |
transition: transform ease-out ${props => props.transition}s; | |
height: 100%; | |
width: ${props => props.width}px; | |
display: flex; | |
` | |
export default SliderContent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment