Last active
March 7, 2019 10:17
-
-
Save dagda1/3b632906b53905ece716d00d7f7d9c15 to your computer and use it in GitHub Desktop.
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
import * as React from 'react'; | |
import { Config } from 'kapellmeister'; | |
import { GetInterpolator } from '..'; | |
export type MakeState<T> = { [P in keyof T]: T[P] extends number | string ? T[P] | T[P][] : MakeState<T[P]> }; | |
export interface INodeGroupProps<T = any, State = any> { | |
data: T[]; | |
keyAccessor: (data: T, index: number) => string | number; | |
start: (data: T, index: number) => State & Partial<Config>; | |
enter?: (data: T, index: number) => MakeState<State> & Partial<Config>; | |
update?: (data: T, index: number) => MakeState<State> & Partial<Config>; | |
leave?: (data: T, index: number) => MakeState<State> & Partial<Config>; | |
children: (nodes: T & { key: string | number; data: T; state: State }[]) => React.ReactElement<any>; | |
} | |
export declare class INodeGroup<T = any, State = any> extends React.Component<INodeGroupProps<T, State>> {} | |
export default INodeGroup; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment