<ion-icon [ngClass]="class" [src]="name ? 'https://api.iconify.design/' + name + '.svg' : src" />
import { CommonModule } from '@angular/common';
import { Component, HostBinding, Input, OnInit } from '@angular/core';
import { IonicModule } from '@ionic/angular';
@Component({
selector: 'app-icon',
standalone: true,
imports: [IonicModule, CommonModule],
templateUrl: './icon.component.html',
styleUrls: ['./icon.component.scss'],
})
export class IconComponent implements OnInit {
@Input() name?: string | undefined;
@Input() src?: string | undefined;
@Input() class?: string | undefined;
@HostBinding('class') _class = 'flex'
constructor() { }
ngOnInit() {}
}