-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathix-icon.ts
38 lines (35 loc) · 935 Bytes
/
ix-icon.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* SPDX-FileCopyrightText: 2024 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
NgZone,
} from '@angular/core';
import type { Components } from '@siemens/ix';
import { ProxyCmp } from './angular-component-lib/utils';
export declare interface IxIcon extends Components.IxIcon {}
@ProxyCmp({
defineCustomElementFn: undefined,
inputs: ['color', 'name', 'size'],
})
@Component({
selector: 'ix-icon',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
inputs: ['color', 'name', 'size'],
})
export class IxIcon {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}