@e-group/redux-modules
Version:
eGroup team react-redux modules that share across projects.
21 lines (20 loc) • 770 B
TypeScript
import React, { ComponentType } from 'react';
interface OwnProps {
handleClose?: () => void;
}
interface DispatchProps {
initializeSnackbar: (name: string) => void;
closeSnackbar: (name: string) => void;
handleClose: () => void;
}
interface StateProps {
isOpen: boolean;
}
export declare type WithReduxSnackbarProps = StateProps & DispatchProps & OwnProps;
/**
* Please read this article for more info.
* https://medium.com/@martin_hotell/react-refs-with-typescript-a32d56c4d315
* @param name
*/
declare const withReduxSnackbar: (name: string) => <T, OriginalProps>(WrappedComponent: ComponentType<any | string>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OriginalProps> & React.RefAttributes<T>>;
export default withReduxSnackbar;