diff --git a/packages/uui-copy/lib/uui-copy.element.ts b/packages/uui-copy/lib/uui-copy.element.ts index 802b6b2b9..f98164b25 100644 --- a/packages/uui-copy/lib/uui-copy.element.ts +++ b/packages/uui-copy/lib/uui-copy.element.ts @@ -3,6 +3,7 @@ import { css, html, LitElement } from 'lit'; import { property } from 'lit/decorators.js'; import { UUIButtonElement } from '@umbraco-ui/uui-button/lib'; import { UUICopyEvent } from './UUICopyEvent'; +import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils'; /** * @summary A button to trigger text content to be copied to the clipboard @@ -72,6 +73,12 @@ export class UUICopyElement extends LitElement { @property({ type: Boolean }) compact = false; + constructor() { + super(); + demandCustomElement(this, 'uui-button'); + demandCustomElement(this, 'uui-icon'); + } + // Used to store the value that will be copied to the clipboard #valueToCopy = '';