Skip to content

Commit

Permalink
Adds in the util func demandCustomElement in ctor as suggested by Jacob
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenbuckley committed Jan 7, 2025
1 parent 3b0bd2c commit a291199
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/uui-copy/lib/uui-copy.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = '';

Expand Down

0 comments on commit a291199

Please sign in to comment.