"use client" import { motion } from "motion/react" import { assign } from "radash" import React, { ComponentPropsWithoutRef, ElementRef, forwardRef } from "react" import { useCallbackRef, useDimensions } from "../../hooks" import { Block } from "../Block" export type AnimateHeightProps = { children: React.ReactNode className?: string } & ComponentPropsWithoutRef export const AnimateHeight = forwardRef< ElementRef, AnimateHeightProps >(function AnimateHeight({ children, className, animate, ...rest }, ref) { const [childRef, setChildRef] = useCallbackRef() const { height: childHeight } = useDimensions(childRef) return ( {children} ) })