File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -41,20 +41,34 @@ export interface TreeProps {
41
41
42
42
export default class Tree extends React . Component < TreeProps > { }
43
43
44
- export interface RendererProps {
44
+ export interface RendererProps < T > {
45
45
measure : ( ) => void ;
46
46
onChange : onChange ;
47
47
node : FlattenedNode ;
48
+ iconsClassNameMap ?: T ;
48
49
}
49
50
50
- declare const Deletable : React . SFC < RendererProps > ;
51
- declare const Expandable : React . SFC < RendererProps > ;
52
- declare const Favorite : React . SFC < RendererProps > ;
51
+ type DeletableRenderProps = RendererProps < { delete ?: string } > ;
52
+
53
+ type ExpandableRenderProps = RendererProps < {
54
+ expanded ?: string ;
55
+ collapsed ?: string ;
56
+ lastChild ?: string ;
57
+ } > ;
58
+
59
+ type FavoriteRenderProps = RendererProps < {
60
+ favorite ?: string ;
61
+ notFavorite ?: string ;
62
+ } > ;
63
+
64
+ declare const Deletable : React . SFC < DeletableRenderProps > ;
65
+ declare const Expandable : React . SFC < ExpandableRenderProps > ;
66
+ declare const Favorite : React . SFC < FavoriteRenderProps > ;
53
67
54
68
interface Renderers {
55
- Deletable : React . SFC < RendererProps > ;
56
- Expandable : React . SFC < RendererProps > ;
57
- Favorite : React . SFC < RendererProps > ;
69
+ Deletable : React . SFC < DeletableRenderProps > ;
70
+ Expandable : React . SFC < ExpandableRenderProps > ;
71
+ Favorite : React . SFC < FavoriteRenderProps > ;
58
72
}
59
73
60
74
export const renderers : Renderers ;
You can’t perform that action at this time.
0 commit comments