amis-rpc-design/node_modules/antd/lib/_util/placements.d.ts

22 lines
862 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
import type { BuildInPlacements } from '@rc-component/trigger';
import { getArrowOffset } from '../style/placementArrow';
export interface AdjustOverflow {
adjustX?: 0 | 1;
adjustY?: 0 | 1;
}
export interface PlacementsConfig {
arrowWidth: number;
arrowPointAtCenter?: boolean;
autoAdjustOverflow?: boolean | AdjustOverflow;
offset: number;
borderRadius: number;
visibleFirst?: boolean;
}
export declare function getOverflowOptions(placement: string, arrowOffset: ReturnType<typeof getArrowOffset>, arrowWidth: number, autoAdjustOverflow?: boolean | AdjustOverflow): {
adjustX?: number | boolean | undefined;
adjustY?: number | boolean | undefined;
shiftX?: number | boolean | undefined;
shiftY?: number | boolean | undefined;
};
export default function getPlacements(config: PlacementsConfig): BuildInPlacements;