Skip to main content

Type Alias: PluginComponentType()<P>

PluginComponentType<P> = (props) => unknown

Defined in: types/frontend.ts:34

A component type that is compatible with React components without importing React. Plugin authors will use actual React components; this type is the API contract.

Type Parameters

Type ParameterDefault typeDescription
PRecord<string, never>Props type for the component

Parameters

ParameterType
propsP

Returns

unknown

Example

// In plugin code (which DOES import React):
const MySettingsPanel: PluginComponentType<{ value: string }> = ({ value }) => {
return <div>{value}</div>;
};