bjgrosse / react-resize-panel

Simple React resize panel component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there type definitions for Typescript?

rikusen0335 opened this issue · comments

I was looking for types but seems nothing. Is there any plan to make types or exists?

Made type definitions for personal use, here you go:

declare module "react-resize-panel" {
  import { CSSProperties } from "react";

  interface ResizePanelProps {
    direction: "s" | "e" | "w" | "n";
    containerClass?: string;
    handleClass?: string;
    borderClass?: string;
    style?: CSSProperties;
  }

  export default class ResizePanel extends React.Component<ResizePanelProps, any> {}
}

Just put it in a *.d.ts file (e.g. ReactResizePanel.d.ts) somewhere in your project.

@TheYarin Thanks. We can use your types temporary.