UNPKG

@postenbring/hedwig-react

Version:

React components for [Hedwig Design System](https://github.com/bring/hedwig-design-system).

32 lines 1.29 kB
export interface AutoAnimateHeightProps extends React.HTMLAttributes<HTMLDivElement> { /** * Time of the animation, using the hedwig animation tokens * quick: 0.1s * normal: 0.3s * slow: 0.7s * * default is "quick" */ animationDuration?: "quick" | "normal" | "slow"; /** * Callback fired when animiation transition ends * Use this to do effects after resizing is done, e.g. scrolling to the element * using `element.scrollIntoView()` */ onTransitionEnd?: () => void; /** * Which hedwig easing function to use, default is "normal" */ animationEasing?: "in" | "out" | "normal"; children: React.ReactNode; style?: React.CSSProperties; } /** * Helper component to animate the height of the children when they change * It's done by rendering two versions of the passed children, * one hidden to measure the height and one visible to only changes after the height is measured. * * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice. */ export declare const AutoAnimateHeight: import("react").ForwardRefExoticComponent<AutoAnimateHeightProps & import("react").RefAttributes<HTMLDivElement>>; //# sourceMappingURL=auto-animate-height.d.ts.map