@code-editor/preview-pip
Version:
A Resizable Picture-in-Picture component.
36 lines (35 loc) • 995 B
TypeScript
import React from "react";
import type { ResizableBoxProps as RawResizableBoxProps } from "react-resizable";
interface ResizableBoxProps extends Omit<RawResizableBoxProps, "width" | "height"> {
/**
* axis to allow resize to
* @default "both"
*/
axis?: "x" | "y" | "both" | "none";
/**
* resize handle to display - a react component
* @default none
*/
resizeHandle?: React.ReactNode;
/**
* @default 500
*/
width?: number;
/**
* @default 500
*/
height?: number;
/**
* @default [300, 300]
*/
minConstraints?: [number, number];
/**
* @default [800, 800]
*/
maxConstraints?: [number, number];
}
declare type ResizablePIPProps = {
children?: React.ReactNode;
} & ResizableBoxProps;
declare function ResizablePIP({ children, axis, resizeHandle, width, height, minConstraints, maxConstraints, ...otherResizableProps }: ResizablePIPProps): JSX.Element;
export default ResizablePIP;