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 {
4141
4242export default class Tree extends React . Component < TreeProps > { }
4343
44- export interface RendererProps {
44+ export interface RendererProps < T > {
4545 measure : ( ) => void ;
4646 onChange : onChange ;
4747 node : FlattenedNode ;
48+ iconsClassNameMap ?: T ;
4849}
4950
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 > ;
5367
5468interface 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 > ;
5872}
5973
6074export const renderers : Renderers ;
You can’t perform that action at this time.
0 commit comments