react-responsive-gallery
Version:
React responsive gallery
23 lines (22 loc) • 632 B
TypeScript
import { LightboxActionType } from "./light-box-actions-type";
interface State {
mediaIndex: number;
isOpen: boolean;
}
declare const initialState: {
mediaIndex: number;
isOpen: boolean;
};
type ActionType = {
type: LightboxActionType.LIGHT_BOX_OPEN;
} | {
type: LightboxActionType.LIGHT_BOX_CLOSE;
} | {
type: LightboxActionType.LIGHT_BOX_OPEN_BY_MEDIA_INDEX;
payload: number;
} | {
type: LightboxActionType.LIGHT_BOX_MOVE_PHOTO_BY_INDEX;
payload: number;
};
declare const lightBoxReducer: (state: typeof initialState, action: ActionType) => State;
export { lightBoxReducer, initialState };