Created
June 8, 2017 22:53
-
-
Save upvalue/10315370a166f2ac5ebdab6c9c57b996 to your computer and use it in GitHub Desktop.
not-yet-functional react-treebeard bindings for typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TypeScript bindings for react-sortable-tree | |
declare module "react-treebeard" { | |
import * as React from 'react'; | |
export interface Node { | |
id?: string; | |
name: string; | |
active?: boolean; | |
toggled?: boolean; | |
loading?: boolean; | |
decorators?: boolean; | |
animations?: boolean; | |
children?: Array<Node>; | |
} | |
export interface ContainerProps { | |
style: any; | |
decorators: any; | |
terminal: boolean; | |
onClick: any; | |
animations: boolean | any; | |
node: Node; | |
} | |
export interface HeaderProps { | |
style?: any; | |
node: Node; | |
} | |
export interface Decorators { | |
Container(ContainerProps): JSX.Element | null; | |
Header(HeaderProps): JSX.Element | null; | |
} | |
export interface SortableTreeDataProp { | |
treeData: Node; | |
} | |
export interface TreebeardProps { | |
data: Array<Node>; | |
onToggle(node: Node, toggled: boolean): void; | |
decorators?: Decorators; | |
className?: string; | |
} | |
export const Treebeard: React.ClassicComponentClass<TreebeardProps>; | |
export const decorators: Decorators; | |
export default Treebeard; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment