Skip to content

Commit a291199

Browse files
committed
Adds in the util func demandCustomElement in ctor as suggested by Jacob
1 parent 3b0bd2c commit a291199

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/uui-copy/lib/uui-copy.element.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { css, html, LitElement } from 'lit';
33
import { property } from 'lit/decorators.js';
44
import { UUIButtonElement } from '@umbraco-ui/uui-button/lib';
55
import { UUICopyEvent } from './UUICopyEvent';
6+
import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
67

78
/**
89
* @summary A button to trigger text content to be copied to the clipboard
@@ -72,6 +73,12 @@ export class UUICopyElement extends LitElement {
7273
@property({ type: Boolean })
7374
compact = false;
7475

76+
constructor() {
77+
super();
78+
demandCustomElement(this, 'uui-button');
79+
demandCustomElement(this, 'uui-icon');
80+
}
81+
7582
// Used to store the value that will be copied to the clipboard
7683
#valueToCopy = '';
7784

0 commit comments

Comments
 (0)