
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@types/react-resizable
Advanced tools
npm install --save @types/react-resizable
This package contains type definitions for react-resizable (https://github.com/react-grid-layout/react-resizable).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-resizable.
import * as React from "react";
export type Axis = "both" | "x" | "y" | "none";
export type ResizeHandle = "s" | "w" | "e" | "n" | "sw" | "nw" | "se" | "ne";
export interface ResizableState {
resizing: boolean;
width: number;
height: number;
slackW: number;
slackH: number;
}
export interface DragCallbackData {
node: HTMLElement;
x: number;
y: number;
deltaX: number;
deltaY: number;
lastX: number;
lastY: number;
}
export interface ResizeCallbackData {
node: HTMLElement;
size: { width: number; height: number };
handle: ResizeHandle;
}
export type ResizableProps =
& {
children?: React.ReactNode;
className?: string | undefined;
handle?:
| React.ReactNode
| ((resizeHandle: ResizeHandle, ref: React.RefObject<any>) => React.ReactNode)
| undefined;
handleSize?: [number, number] | undefined;
lockAspectRatio?: boolean | undefined;
minConstraints?: [width: number, height: number] | undefined;
maxConstraints?: [width: number, height: number] | undefined;
onResizeStop?: ((e: React.SyntheticEvent, data: ResizeCallbackData) => any) | undefined;
onResizeStart?: ((e: React.SyntheticEvent, data: ResizeCallbackData) => any) | undefined;
onResize?: ((e: React.SyntheticEvent, data: ResizeCallbackData) => any) | undefined;
draggableOpts?: any;
resizeHandles?: ResizeHandle[] | undefined;
transformScale?: number;
}
& (
| {
width: number;
height?: number | undefined;
axis: "x";
}
| {
width?: number | undefined;
height: number;
axis: "y";
}
| {
width: number;
height: number;
axis?: "both";
}
);
export class Resizable extends React.Component<ResizableProps, ResizableState> {}
export interface ResizableBoxState {
height: number;
width: number;
}
export type ResizableBoxProps = ResizableProps & { style?: React.CSSProperties };
export class ResizableBox extends React.Component<ResizableBoxProps, ResizableBoxState> {}
These definitions were written by Harry Brrundage.
FAQs
TypeScript definitions for react-resizable
We found that @types/react-resizable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.