react-lightning-design-system
Version:
Salesforce Lightning Design System components built with React
28 lines (27 loc) • 893 B
TypeScript
import { FC, ReactElement, Ref } from 'react';
type VertAlign = 'top' | 'bottom' | 'top-absolute' | 'bottom-absolute';
type HorizAlign = 'left' | 'right' | 'left-absolute' | 'right-absolute';
type Align = VertAlign | HorizAlign;
export type RectangleAlignment = Readonly<[Align] | [Align, Align]>;
export type AutoAlignProps = {
triggerSelector: string;
alignmentStyle: 'menu' | 'popover';
portalClassName?: string;
portalStyle?: object;
size?: 'small' | 'medium' | 'large';
preventPortalize?: boolean;
align?: Align;
alignment?: RectangleAlignment;
offsetX?: number;
offsetY?: number;
children: (props: AutoAlignInjectedProps) => ReactElement;
};
export type AutoAlignInjectedProps = {
alignment: RectangleAlignment;
autoAlignContentRef: Ref<HTMLElement | null>;
};
/**
*
*/
export declare const AutoAlign: FC<AutoAlignProps>;
export {};