@clayui/shared
Version:
ClayShared component
21 lines (20 loc) • 655 B
TypeScript
/**
* SPDX-FileCopyrightText: © 2021 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
declare type AlignBase = {
offset?: readonly [number, number];
overflow?: {
adjustX: boolean;
adjustY: boolean;
alwaysByViewport?: boolean;
};
points?: readonly [string, string];
targetOffset?: readonly [string, string];
};
declare type AlignProps<T, K> = AlignBase & {
sourceElement: K;
targetElement: T;
};
export declare function doAlign<T extends HTMLElement, K extends HTMLElement>({ sourceElement, targetElement, ...config }: AlignProps<T, K>): Required<AlignBase>;
export {};