-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
28 lines (25 loc) · 725 Bytes
/
index.d.ts
File metadata and controls
28 lines (25 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as React from 'react';
import { Graph, GraphNode, HistoryItem } from './graph';
// Prop types
export interface ConverseProps<T> {
graph: Graph;
children: (
history: Array<HistoryItem>,
typing: boolean
) => React.ReactElement<any>;
compose?: (message: object) => object;
onChange?: (path: Array<string>) => void;
typing?: boolean;
}
export interface StepComponentProps<T> {
mark?: string;
[key: string]: any;
}
// Component types
export type ConverseComponent<T> = React.ComponentClass<
ConverseProps<T>
>;
export type StepComponent<T> = React.ComponentType<StepComponentProps<T>>;
// Components
export const Converse: ConverseComponent<object>;
export const Step: StepComponent<object>;