UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

19 lines (18 loc) 872 B
import { OFExtensions, SupportedLocales } from '@open-formulieren/types'; import React from 'react'; import { AnyComponentSchema } from '../../types/schemas'; import './i18n.scss'; import './table.scss'; type ExtractTranslatableProperties<T> = T extends OFExtensions<infer TK> ? TK : never; export interface ComponentTranslationsProps<S extends AnyComponentSchema> { propertyLabels: { [key in ExtractTranslatableProperties<S>]: string; }; children?: React.ReactNode; } export interface ComponentTranslationsContextType { activeLanguage: SupportedLocales; } export declare const ComponentTranslationsContext: React.Context<ComponentTranslationsContextType>; export declare function ComponentTranslations<S extends AnyComponentSchema>({ propertyLabels, children, }: ComponentTranslationsProps<S>): import("react/jsx-runtime").JSX.Element; export {};