1.1.0 • Published 6 years ago

@gnarlycode/react-styled-css-transition v1.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago
GNARLY CODE Production Introducing

React Styled Css Transition

Helper function for using CSSTransition with Styled Components

Installation

npm i --save @gnarlycode/react-styled-css-transition

Usage

import { css } from 'styled-components'
import { styledCSSTransition } from '@gnarlycode/react-styled-css-transition'

const TransitionComponent = styledCSSTransition(
  {
    mountOnEnter: true,
    timeout: {
      enter: 100,
      exit: 100,
    },
    unmountOnExit: true,
    // any CSSTransitionProps
  },
  css`
    &.appear {}
    &.appear-active {}
    &.enter {}
    &.enter-active {}
    &.exit {}
    &.exit-active {}
  `,
)
Author: Dmitry Podlesny