npm.io
1.0.6 • Published 2 years ago

@types/react-panelgroup

Licence
MIT
Version
1.0.6
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-panelgroup

Summary

This package contains type definitions for react-panelgroup (https://github.com/DanFessler/react-panelgroup).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-panelgroup.

index.d.ts

import * as React from "react";

/**
 * Interface used to define a number of options for a panel.
 */
export interface PanelWidth {
    size?: number | undefined;
    minSize?: number | undefined;
    resize?: "fixed" | "dynamic" | "stretch" | undefined;
    snap?: number[] | undefined;
}

export interface PropTypes {
    children?: React.ReactNode;
    spacing?: number | undefined;
    borderColor?: string | undefined;
    panelColor?: string | undefined;
    direction?: "row" | "column" | undefined;
    panelWidths?: Array<PanelWidth | null> | undefined;
    onUpdate?: ((data: PanelWidth[]) => void) | undefined;
    onResizeStart?: ((data: PanelWidth[]) => void) | undefined;
    onResizeEnd?: ((data: PanelWidth[]) => void) | undefined;
}

/**
 * React component that allows for the creation of resizable panels.
 */
export default class PanelGroup extends React.Component<PropTypes> {}

Additional Details

  • Last updated: Fri, 29 Mar 2024 1126 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Quentin Golsteyn.