@knapsack/app
Version:
Build Design Systems on top of knapsack, by Basalt
29 lines • 1.37 kB
TypeScript
import { ThunkAction } from 'redux-thunk';
import { Action } from './types';
import { Actions as NavActions } from './navs';
import { KnapsackCustomPage, KnapsackCustomPagesData } from '../../schemas/custom-pages';
declare const UPDATE_PAGE = "knapsack/custom-pages/UPDATE_PAGE";
declare const ADD_PAGE = "knapsack/custom-pages/ADD_PAGE";
interface UpdatePageAction extends Action {
type: typeof UPDATE_PAGE;
payload: KnapsackCustomPage;
}
export declare function updateCustomPage(page: KnapsackCustomPage): UpdatePageAction;
declare const DELETE_PAGE = "knapsack/custom-pages/DELETE_PAGE";
interface DeletePageAction extends Action {
type: typeof DELETE_PAGE;
payload: {
id: string;
};
}
export declare function deletePage(payload: DeletePageAction['payload']): ThunkAction<void, AppState, {}, Actions | NavActions>;
interface AddPage extends Action {
type: typeof ADD_PAGE;
payload: Pick<KnapsackCustomPage, 'id' | 'title'>;
}
declare type Actions = UpdatePageAction | AddPage | DeletePageAction;
declare type AppState = import('./index').AppState;
export declare function addPage(page: Pick<KnapsackCustomPage, 'title'>): ThunkAction<void, AppState, {}, Actions | NavActions>;
export default function (state: KnapsackCustomPagesData, action: Actions): KnapsackCustomPagesData;
export {};
//# sourceMappingURL=custom-pages.d.ts.map