@types/react-resizable

  • Version 3.0.2
  • Published
  • 7.25 kB
  • 1 dependency
  • MIT license

Install

npm i @types/react-resizable
yarn add @types/react-resizable
pnpm add @types/react-resizable

Overview

TypeScript definitions for react-resizable

Index

Classes

class Resizable

class Resizable extends React.Component<ResizableProps, ResizableState> {}

    class ResizableBox

    class ResizableBox extends React.Component<ResizableBoxProps, ResizableBoxState> {}

      Interfaces

      interface DragCallbackData

      interface DragCallbackData {}

        property deltaX

        deltaX: number;

          property deltaY

          deltaY: number;

            property lastX

            lastX: number;

              property lastY

              lastY: number;

                property node

                node: HTMLElement;

                  property x

                  x: number;

                    property y

                    y: number;

                      interface ResizableBoxState

                      interface ResizableBoxState {}

                        property height

                        height: number;

                          property width

                          width: number;

                            interface ResizableState

                            interface ResizableState {}

                              property height

                              height: number;

                                property resizing

                                resizing: boolean;

                                  property slackH

                                  slackH: number;

                                    property slackW

                                    slackW: number;

                                      property width

                                      width: number;

                                        interface ResizeCallbackData

                                        interface ResizeCallbackData {}

                                          property handle

                                          handle: ResizeHandle;

                                            property node

                                            node: HTMLElement;

                                              property size

                                              size: { width: number; height: number };

                                                Type Aliases

                                                type Axis

                                                type Axis = 'both' | 'x' | 'y' | 'none';

                                                  type ResizableBoxProps

                                                  type ResizableBoxProps = ResizableProps;

                                                    type ResizableProps

                                                    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?: [number, number] | undefined;
                                                    maxConstraints?: [number, 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';
                                                    }
                                                    );

                                                      type ResizeHandle

                                                      type ResizeHandle = 's' | 'w' | 'e' | 'n' | 'sw' | 'nw' | 'se' | 'ne';

                                                        Package Files (1)

                                                        Dependencies (1)

                                                        Dev Dependencies (0)

                                                        No dev dependencies.

                                                        Peer Dependencies (0)

                                                        No peer dependencies.

                                                        Badge

                                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-resizable.

                                                        • Markdown
                                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-resizable)
                                                        • HTML
                                                          <a href="https://www.jsdocs.io/package/@types/react-resizable"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>