UNPKG

@arcgis/coding-components

Version:

Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.

24 lines (23 loc) 910 B
import { JsxNode } from '@arcgis/lumina'; export type ICustomPanel = { /** Unique ID */ id: string; /** Panel name - will be used in tooltip for side action bar and heading */ name: string; /** Calcite icon */ icon: string; /** Optional description */ description?: string; /** Optional flag to indicate that the user is providing custom flow items */ useFlows?: boolean; /** Renderer function that returns a JSX node */ renderer: ({ closePanel, insertText, }: { closePanel: (e: Event) => void; insertText: (text: string) => void; }) => JsxNode; }; /** * validates that the renderer function returns a a jsx node that includes a calcite-flow-item. * TODO: this should be improved to check that actual render result, and perform sanitation. */ export declare const validateUseFlowsRenderer: (renderer: ICustomPanel["renderer"]) => boolean;