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 Parameter | Default type | Description |
|---|---|---|
P | Record<string, never> | Props type for the component |
Parameters
| Parameter | Type |
|---|---|
props | P |
Returns
unknown
Example
// In plugin code (which DOES import React):
const MySettingsPanel: PluginComponentType<{ value: string }> = ({ value }) => {
return <div>{value}</div>;
};