baseui
Version:
A React Component library implementing the Base design language
19 lines (18 loc) • 799 B
TypeScript
import * as React from 'react';
import { STATE_CHANGE_TYPE } from './constants';
import type { StatefulContainerProps, State } from './types';
import type { SyntheticEvent } from 'react';
declare function defaultStateReducer(type: (typeof STATE_CHANGE_TYPE)[keyof typeof STATE_CHANGE_TYPE], nextState: State, currentState: State): State;
export default class StatefulContainer extends React.Component<StatefulContainerProps, State> {
static defaultProps: {
initialState: {
selected: any[];
};
stateReducer: typeof defaultStateReducer;
};
constructor(props: StatefulContainerProps);
changeState: (nextState: State) => void;
onClick: (event: SyntheticEvent<HTMLButtonElement>, index: number) => void;
render(): React.ReactNode;
}
export {};