Created
March 2, 2020 14:51
-
-
Save DZuz14/2d0125053ef77999df335afa7b6ec373 to your computer and use it in GitHub Desktop.
SliderContent refactor
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
/** @jsx jsx */ | |
import React from 'react' | |
import { css, jsx } from '@emotion/core' | |
const SliderContent = props => ( | |
<div | |
css={css` | |
transform: translateX(-${props.translate}px); | |
transition: transform ease-out ${props.transition}s; | |
height: 100%; | |
width: ${props.width}px; | |
display: flex; | |
`} | |
> | |
{props.children} | |
</div> | |
) | |
export default SliderContent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment