Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Created March 2, 2020 14:51
Show Gist options
  • Save DZuz14/2d0125053ef77999df335afa7b6ec373 to your computer and use it in GitHub Desktop.
Save DZuz14/2d0125053ef77999df335afa7b6ec373 to your computer and use it in GitHub Desktop.
SliderContent refactor
/** @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