UNPKG

burdy

Version:

Open Source Headless Platform

19 lines (18 loc) 782 B
/// <reference types="react" /> import { UseAsyncReturn } from 'react-async-hook'; import { IContentType, ISiteSettings } from '@shared/interfaces/model'; import { ModelState } from '@admin/helpers/hooks'; export interface ISettingsContext { settingsArray: ISiteSettings[]; settingsState: ModelState<ISiteSettings>; open: boolean; setOpen: (value: boolean) => void; getContentTypes: UseAsyncReturn<IContentType[], [params?: any]>; getSettings: UseAsyncReturn<ISiteSettings[], []>; updateSettings: UseAsyncReturn<ISiteSettings, [key: string, value: string]>; } declare const SettingsContextProvider: ({ children }: { children: any; }) => JSX.Element; declare const useSettings: () => ISettingsContext; export { SettingsContextProvider, useSettings };