react-equal-height
Version:
A React library with TypeScript support that automatically compares and sets the highest element height, including the ability to sort elements per row. Protected by the 'use client' directive, making it compatible with React Server Components and Next.js
14 lines (13 loc) • 607 B
TypeScript
import { ComponentPropsWithoutRef, ElementType, PropsWithChildren, Ref } from 'react';
import { Props as ElementProps } from './equal-height-element';
export interface ElementsProps extends Pick<ElementProps, 'name' | 'placeholder'> {
id: string;
height?: number;
}
export type Props<T extends ElementType> = {
as?: T;
} & ComponentPropsWithoutRef<T>;
declare const EqualHeightHolder: <T extends ElementType = "div">({ as, children, ...props }: PropsWithChildren<Props<T>> & {
forwardedref?: Ref<HTMLElement>;
}) => import("react/jsx-runtime").JSX.Element;
export default EqualHeightHolder;