Skip to content

Commit 1930695

Browse files
committed
docs(copilot advice): reformat code examples
1 parent e14a29b commit 1930695

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

15/umbraco-cms/customizing/extending-overview/extension-types/menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The manifest can also be written in TypeScript.
3636
For this TypeScript example we used a [Backoffice Entry Point](../../extending-overview/extension-types/backoffice-entry-point.md) extension to register the manifests.
3737

3838
```typescript
39-
import type { ManifestMenu } from "@umbraco-cms/backoffice/menu";
39+
import type { ManifestMenu } from '@umbraco-cms/backoffice/menu';
4040

4141
const menuManifest: Array<ManifestMenu> = [
4242
{

15/umbraco-cms/customizing/extending-overview/extension-types/modals/custom-modals.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ There are two parts to creating a custom modal:
2020
A modal token is a string that identifies a modal. This is the modal extension alias. It is used to open a modal and is also to set default options for the modal. It should also have a unique alias to avoid conflicts with other modals.
2121

2222
```ts
23-
import { UmbModalToken } from "@umbraco-cms/backoffice/modal";
23+
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
2424

2525
export type MyModalData = {
2626
headline: string;
@@ -48,10 +48,10 @@ Additionally, the modal element can see its data parameters through the `modalCo
4848

4949
{% code title="my-modal.element.ts" %}
5050
```ts
51-
import { html, LitElement, property, customElement } from "@umbraco-cms/backoffice/external/lit";
52-
import { UmbElementMixin } from "@umbraco-cms/backoffice/element-api";
53-
import { type UmbModalContext, UmbModalExtensionElement } from "@umbraco-cms/backoffice/modal";
54-
import type { MyModalData, MyModalValue } from "./my-modal.token.ts";
51+
import { html, LitElement, property, customElement } from '@umbraco-cms/backoffice/external/lit';
52+
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
53+
import { type UmbModalContext, UmbModalExtensionElement } from '@umbraco-cms/backoffice/modal';
54+
import type { MyModalData, MyModalValue } from './my-modal.token.js';
5555

5656
@customElement('my-dialog')
5757
export default class MyDialogElement
@@ -69,14 +69,14 @@ export default class MyDialogElement
6969
}
7070

7171
private _handleSubmit() {
72-
this.modalContext?.updateValue({ myData: "hello world" });
72+
this.modalContext?.updateValue({ myData: 'hello world' });
7373
this.modalContext?.submit();
7474
}
7575

7676
render() {
7777
return html`
7878
<div>
79-
<h1>${this.modalContext?.data.headline ?? "Default headline"}</h1>
79+
<h1>${this.modalContext?.data.headline ?? 'Default headline'}</h1>
8080
<button @click=${this._handleCancel}>Cancel</button>
8181
<button @click=${this._handleSubmit}>Submit</button>
8282
</div>

15/umbraco-cms/customizing/extending-overview/extension-types/sections/section-view.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The manifest can also be written in TypeScript.
5151
For this TypeScript example we used a [Backoffice Entry Point](../backoffice-entry-point.md) extension to register the manifests.
5252

5353
```typescript
54-
import { ManifestSectionView } from "@umbraco-cms/backoffice/section";
54+
import { ManifestSectionView } from '@umbraco-cms/backoffice/section';
5555

5656
const sectionViews: Array<ManifestSectionView> = [
5757
{
@@ -83,7 +83,7 @@ Creating the Section View Element using a Lit Element.
8383
**my-section.element.ts:**
8484

8585
```typescript
86-
import { UmbLitElement } from "@umbraco-cms/backoffice/lit-element";
86+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
8787
import { css, html, customElement, property } from '@umbraco-cms/backoffice/external/lit';
8888

8989
@customElement('my-sectionview-element')

15/umbraco-cms/tutorials/creating-a-custom-dashboard/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ Now let's create the web component we need for our property editor. This web com
101101

102102
{% code title="welcome-dashboard.element.ts" lineNumbers="true" overflow="wrap" %}
103103
```typescript
104-
import { LitElement, css, html, customElement } from "@umbraco-cms/backoffice/external/lit";
105-
import { UmbLitElement } from "@umbraco-cms/backoffice/lit-element";
104+
import { LitElement, css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
105+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
106106

107107
@customElement('my-welcome-dashboard')
108108
export class MyWelcomeDashboardElement extends UmbLitElement {

15/umbraco-cms/tutorials/creating-a-property-editor/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/propert
9191
@customElement('my-suggestions-property-editor-ui')
9292
export default class MySuggestionsPropertyEditorUIElement extends LitElement implements UmbPropertyEditorUiElement {
9393
@property({ type: String })
94-
public value = "";
94+
public value = '';
9595

9696
override render() {
9797
return html`I'm a property editor!`;
@@ -218,14 +218,14 @@ It should now look something like this:
218218

219219
{% code title="suggestions-property-editor-ui.element.ts" lineNumbers="true" %}
220220
```typescript
221-
import { LitElement, html, css, customElement, property } from "@umbraco-cms/backoffice/external/lit";
222-
import type { UmbPropertyEditorUiElement } from "@umbraco-cms/backoffice/property-editor";
221+
import { LitElement, html, css, customElement, property } from '@umbraco-cms/backoffice/external/lit';
222+
import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/property-editor';
223223
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
224224
225225
@customElement('my-suggestions-property-editor-ui')
226226
export default class MySuggestionsPropertyEditorUIElement extends LitElement implements UmbPropertyEditorUiElement {
227227
@property({ type: String })
228-
public value = "";
228+
public value = '';
229229
230230
override render() {
231231
return html`
@@ -345,7 +345,7 @@ Let's look at the suggestions button next.
345345
346346
{% code title="suggestions-property-editor-ui.element.ts" %}
347347
```typescript
348-
import { LitElement, html, css, customElement, property, state } from "@umbraco-cms/backoffice/external/lit";
348+
import { LitElement, html, css, customElement, property, state } from '@umbraco-cms/backoffice/external/lit';
349349
```
350350
{% endcode %}
351351

15/umbraco-cms/tutorials/creating-a-property-editor/adding-configuration-to-a-property-editor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ The next step is to gain access to our new configuration options. For this, open
192192

193193
{% code title="suggestions-property-editor-ui.element.ts" %}
194194
```typescript
195-
import { type UmbPropertyEditorConfigCollection } from "@umbraco-cms/backoffice/property-editor";
195+
import { type UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor';
196196
```
197197
{% endcode %}
198198

@@ -215,7 +215,7 @@ We can now use the configurations. Let's use the `placeholder` and `maxChars` fo
215215

216216
{% code title="suggestions-property-editor-ui.element.ts" %}
217217
```typescript
218-
import { ifDefined } from "@umbraco-cms/backoffice/external/lit";
218+
import { ifDefined } from '@umbraco-cms/backoffice/external/lit';
219219
```
220220
{% endcode %}
221221

15/umbraco-cms/tutorials/creating-a-property-editor/integrating-context-with-a-property-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ import { UMB_MODAL_MANAGER_CONTEXT, UMB_CONFIRM_MODAL,} from '@umbraco-cms/backo
111111
2. Remove the `UmbNotificationContext` from the `'@umbraco-cms/backoffice/notification'` import:
112112

113113
```typescript
114-
import { UMB_NOTIFICATION_CONTEXT, UmbNotificationDefaultData } from "@umbraco-cms/backoffice/notification";
114+
import { UMB_NOTIFICATION_CONTEXT, UmbNotificationDefaultData } from '@umbraco-cms/backoffice/notification';
115115
```
116116

117117
3. Update the constructor to consume the `UMB_MODAL_MANAGER_CONTEXT`and the `UMB_CONFIRM_MODAL.`

0 commit comments

Comments
 (0)