frontend-plugin-api: update createComponentExtension for new naming pattern
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -405,6 +405,7 @@ export function createComponentExtension<
|
||||
TInputs extends AnyExtensionInputMap,
|
||||
>(options: {
|
||||
ref: TRef;
|
||||
name?: string;
|
||||
disabled?: boolean;
|
||||
inputs?: TInputs;
|
||||
configSchema?: PortableSchema<TConfig>;
|
||||
@@ -421,7 +422,7 @@ export function createComponentExtension<
|
||||
inputs: Expand<ExtensionInputValues<TInputs>>;
|
||||
}) => TRef['T'];
|
||||
};
|
||||
}): Extension<TConfig>;
|
||||
}): ExtensionDefinition<TConfig>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createExtension<
|
||||
|
||||
@@ -32,6 +32,7 @@ export function createComponentExtension<
|
||||
TInputs extends AnyExtensionInputMap,
|
||||
>(options: {
|
||||
ref: TRef;
|
||||
name?: string;
|
||||
disabled?: boolean;
|
||||
inputs?: TInputs;
|
||||
configSchema?: PortableSchema<TConfig>;
|
||||
@@ -49,9 +50,10 @@ export function createComponentExtension<
|
||||
}) => TRef['T'];
|
||||
};
|
||||
}) {
|
||||
const id = options.ref.id;
|
||||
return createExtension({
|
||||
id,
|
||||
kind: 'component',
|
||||
namespace: options.ref.id,
|
||||
name: options.name,
|
||||
attachTo: { id: 'core', input: 'components' },
|
||||
inputs: options.inputs,
|
||||
disabled: options.disabled,
|
||||
|
||||
Reference in New Issue
Block a user