Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/assets-library/src/icons/icon-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const enum IconType {
Collapsed = 'svg:plus-square',
Compare = 'svg:compare',
CompareArrows = 'compare_arrows',
ContentCopy = 'content_copy',
CopyToClipboard = 'svg:copy-to-clipboard',
Code = 'svg:code',
Custom = 'svg:custom',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class CopyToClipboardComponent implements OnInit, OnDestroy {
public size?: ButtonSize = ButtonSize.Small;

@Input()
public icon?: IconType = IconType.CopyToClipboard;
public icon?: IconType = IconType.ContentCopy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is different than copy to clipboard and meant to replace it, can we remove the old one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to check with Michael on this, but this one looks better and is coming from material directly.


@Input()
public label?: string = 'Copy to Clipboard';
Expand All @@ -63,6 +63,9 @@ export class CopyToClipboardComponent implements OnInit, OnDestroy {
@Input()
public text?: string;

@Input()
public tooltipDuration: number = 3000;

@Output()
public readonly copiedChanges: EventEmitter<boolean> = new EventEmitter();

Expand Down Expand Up @@ -133,7 +136,7 @@ export class CopyToClipboardComponent implements OnInit, OnDestroy {
});

return of(popoverRef).pipe(
delay(3000),
delay(this.tooltipDuration ?? 0),
finalize(() => popoverRef.close())
);
}
Expand Down