@j2inn/app
Version:
J2 Innovations core application framework
27 lines (26 loc) • 746 B
TypeScript
import { HVal } from 'haystack-core';
import { AppProps } from './AppProps';
/**
* Properties for an editor.
*/
export interface AppEditorProps extends AppProps {
/**
* The current haystack value to render in the editor.
*/
value: HVal;
/**
* An optional callback that's invoked everytime a change is made to the editor.
*
* @param event The change event.
* @param event.value The updated haystack value.
* @param event.valid A flag indicating whether the value is valid or not.
*/
onChange?: (event: {
value: HVal;
valid: boolean;
}) => void;
/**
* An optional readonly flag that tells the editor to run as readonly or not.
*/
readonly?: boolean;
}