azure-devops-ui
Version:
React components for building web UI in Azure DevOps
51 lines (50 loc) • 1.66 kB
TypeScript
import "../../CommonImports";
import "../../Core/core.css";
import "./Sizer.css";
import * as React from "react";
import { ISizedProps, ISizerProps } from "./Sizer.Props";
export interface ISizerState {
showPortal: boolean;
resizeInProgress: boolean;
resizeButtonsUsed: boolean;
lastTouchLocation: number;
}
export declare class Sizer extends React.Component<ISizerProps, ISizerState> {
static defaultProps: Partial<ISizerProps>;
sizerRef: React.RefObject<HTMLDivElement>;
private sizerCalloutRef;
private debouncedEnd;
private lastLocation;
private timerManagement;
constructor(props: Readonly<ISizerProps>);
state: {
showPortal: boolean;
resizeInProgress: boolean;
lastTouchLocation: number;
resizeButtonsUsed: boolean;
};
render(): JSX.Element | null;
componentDidMount(): void;
componentWillUnmount(): void;
private onDragStart;
private onDragEnd;
private onDragEquivalentButtonClick;
private onMouseCapture;
private getMouseLocation;
private onKeyDown;
private onSizeEnd;
private handleClickOutside;
private onMouseDown;
private updateSize;
}
/**
* The Sized function is used to produce a div that has a fixed width or height
* based on the orientation of the sized props. This is a basic component that
* can be used with the Sizer to produce a basic splitter like UI.
*
* @param props properties to render the appropriate container element given the
* props.
*/
export declare function Sized(props: ISizedProps & {
children?: React.ReactNode;
}): JSX.Element;