Skip to content

Commit 4b1e29a

Browse files
committed
Addressing Andy's feedback
1 parent 00b9df3 commit 4b1e29a

File tree

1 file changed

+7
-10
lines changed
  • 16/umbraco-cms/customizing/extending-overview/extension-types

1 file changed

+7
-10
lines changed

16/umbraco-cms/customizing/extending-overview/extension-types/kind.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ To register a Kind, use the same method as other extensions. The key properties
2929
The following example shows how to register a Button Kind for [**Header Apps**](../extension-types/header-apps.md). This kind provides a preset configuration for a button element that can be reused by other Header App extensions.
3030

3131
```typescript
32-
const manifest: ManifestKind<UmbExtensionManifest> = {
32+
import type { UmbExtensionManifestKind } from "@umbraco-cms/backoffice/extension-registry";
33+
34+
export const customHeaderAppButton: UmbExtensionManifestKind = {
3335
type: 'kind',
3436
alias: 'Umb.Kind.MyButtonKind', // Unique alias for the Kind
3537
matchType: 'headerApp', // Applies to Header App extensions
@@ -41,7 +43,7 @@ const manifest: ManifestKind<UmbExtensionManifest> = {
4143
};
4244
```
4345

44-
In this example:
46+
Properties:
4547

4648
- `type` is set to 'kind' to register it as a Kind extension.
4749
- `matchType` is 'headerApp', specifying that this Kind is for Header App extensions.
@@ -78,15 +80,15 @@ Here’s an example of how to register and use the Button Kind in a Header App e
7880

7981
{% code title="kinds/manifests.ts" %}
8082

81-
{% hint style="warning" %}
83+
{% hint style="info" %}
8284
This example uses the dynamic extension registration approach. `umbExtensionsRegistry.register()` might be called from within an entrypoint lifecycle method like `onInit()`. For more information, see the [Backoffice Entry Point](./backoffice-entry-point.md) article.
8385
{% endhint %}
8486

8587
```typescript
8688
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
87-
import type { ManifestKind } from "@umbraco-cms/backoffice/extension-api";
89+
import type { UmbExtensionManifestKind } from "@umbraco-cms/backoffice/extension-registry";
8890

89-
const manifest: ManifestKind<UmbExtensionManifest> = {
91+
export const customHeaderAppButton: UmbExtensionManifestKind = {
9092
type: 'kind',
9193
alias: 'Umb.Kind.MyButtonKind', // Alias for the Kind
9294
matchType: 'headerApp', // Extension type the Kind applies to
@@ -105,11 +107,6 @@ This code registers the Button Kind, so other Header App extensions using `type:
105107
Now another Header App extension can be created without defining `elementName`, as it will automatically inherit it from the Kind:
106108

107109
{% code title="kinds/manifests.ts" %}
108-
109-
{% hint style="warning" %}
110-
This example uses the dynamic extension registration approach. `umbExtensionsRegistry.register()` might be called from within an entrypoint lifecycle method like `onInit()`. For more information, see the [Backoffice Entry Point](./backoffice-entry-point.md) article.
111-
{% endhint %}
112-
113110
```typescript
114111
import { umbExtensionsRegistry } from "@umbraco-cms/backoffice/extension-registry";
115112

0 commit comments

Comments
 (0)