Files
directus/src/interfaces/types.ts
Rijk van Zanten 571412ff2c Add wysiwyg interface (#460)
* Install tinymce

* Add wysiwyg interface

* Mock window.matchMedia

* Fix wysiwyg not reading data on value change

* Render skeleton loader on top of wysiwyg

* Add hideLoader support to interfaces

* Sneak this little bugfix in unnoticed

It's now passing on the interface / options to the display rendering in render-template
2020-04-23 14:01:27 -04:00

20 lines
544 B
TypeScript

import VueI18n from 'vue-i18n';
import { Component } from 'vue';
import { Field } from '@/stores/fields/types';
export type InterfaceConfig = {
id: string;
icon: string;
name: string | VueI18n.TranslateResult;
component: Component;
options: Partial<Field>[] | Component;
hideLabel?: boolean;
hideLoader?: boolean;
};
export type InterfaceContext = { i18n: VueI18n };
export type InterfaceDefineParam = InterfaceDefineParamGeneric<InterfaceConfig>;
export type InterfaceDefineParamGeneric<T> = T | ((context: InterfaceContext) => T);