UNPKG

@pdfme/ui

Version:

TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!

15 lines (9 loc) 565 B
import { createContext } from 'react'; import { i18n } from './i18n.js'; import { getDefaultFont, PluginRegistry, pluginRegistry, UIOptions } from '@pdfme/common'; import { builtInPlugins } from '@pdfme/schemas'; export const I18nContext = createContext(i18n); export const FontContext = createContext(getDefaultFont()); export const PluginsRegistry = createContext<PluginRegistry>(pluginRegistry(builtInPlugins)); export const OptionsContext = createContext<UIOptions>({}); export const CacheContext = createContext<Map<string | number, unknown>>(new Map());