Stanko / react-animate-height

Lightweight React component for animating height using CSS transitions. Slide up/down the element, and animate it to any specific height.
https://muffinman.io/react-animate-height
MIT License
756 stars 53 forks source link

AnimateHeightProps no longer exported in 3.0 (typescript) #133

Closed xec closed 1 year ago

xec commented 1 year ago

Code example

import AnimateHeight, { AnimateHeightProps } from 'react-animate-height'

Works fine in 2.* but in 3.0 results in error message:

 error TS2614: Module '"react-animate-height"' has no exported member 'AnimateHeightProps'. Did you mean to use 'import AnimateHeightProps from "react-animate-height"' instead?

Expected behavior Can import the props definition as in 2.*

Possible Solution The AnimateHeightProps is defined in the published typescript definition file, but is missing the export keyword Please export the AnimateHeightProps typescript interface :)

Your Environment

Additional context I'm writing react components for a design system, and since animating height in css is complicated, we've created a SlideDown component that is basically just a wrapper for AnimateHeight with some styling applied, with a few props added on.

In order to support (and forward) the same props that AnimateHeight does, it is very useful for us to be able to extend the props type.

Stanko commented 1 year ago

Thanks, fixed in v3.0.5

xec commented 1 year ago

Wow, that was quick! Thank you! :)