@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
33 lines (32 loc) • 1.43 kB
TypeScript
import type { HTMLProps, RefObject } from 'react';
import type { UseHeightAnimationOptions } from './useHeightAnimation';
import type { DynamicElement, SpacingProps } from '../../shared/types';
export type HeightAnimationProps = {
/**
* Set to `true` to ensure the nested children content will be kept in the DOM. Defaults to `false`.
*/
keepInDOM?: boolean;
/**
* Set to `true` to omit the usage of "overflow: hidden;". Defaults to `false`.
*/
showOverflow?: boolean;
/**
* Custom duration of the animation in milliseconds. Defaults to `400`.
*/
duration?: number;
/**
* Custom delay of the animation in milliseconds. Defaults to `0`.
*/
delay?: number;
/**
* Custom HTML element for the component. Defaults to `div` HTML Element.
*/
element?: DynamicElement;
/**
* Send along a custom `React.Ref`.
*/
ref?: RefObject<HTMLElement>;
} & UseHeightAnimationOptions;
export type HeightAnimationAllProps = HeightAnimationProps & SpacingProps & Omit<HTMLProps<HTMLElement>, 'ref' | 'onAnimationEnd' | 'onAnimationStart'>;
declare function HeightAnimation({ open, animate, keepInDOM, showOverflow, element, duration, delay, className, ref, children, compensateForGap, onInit, onOpen, onAnimationStart, onAnimationEnd, ...rest }: HeightAnimationAllProps): import("react/jsx-runtime").JSX.Element;
export default HeightAnimation;