@clubmed/trident-ui
Version:
Shared ClubMed React UI components
30 lines (29 loc) • 950 B
TypeScript
import { type FunctionComponent, type PropsWithChildren } from 'react';
/**
* This is not a Collapse component, it's a component that animates *to* the height of its children.
* It does the *absolute* same but you Bring Your Own Height™ by applying a class to the children.
* e.g.: <ElasticHeight className={isOpen ? "" : "h-0"}><div>...</div></ElasticHeight>
* ID is there for accessibility purposes.
*
* This is in no way affiliated with Amazon ElasticSearch.
*/
interface ElasticHeightProps {
/**
* Id of the element
*/
id?: string;
/**
* Class of the element (please provide something that sets the height)
*/
className?: string;
/**
* Class of the container (to avoid CLS, mainly)
*/
containerClassName?: string;
/**
* Role of the element
*/
role?: string;
}
export declare const ElasticHeight: FunctionComponent<PropsWithChildren<ElasticHeightProps>>;
export {};