icon-button.component.ts raw
1 import { Component, Input } from '@angular/core';
2
3 @Component({
4 // eslint-disable-next-line @angular-eslint/component-selector
5 selector: 'lib-icon-button',
6 imports: [],
7 templateUrl: './icon-button.component.html',
8 styleUrl: './icon-button.component.scss',
9 })
10 export class IconButtonComponent {
11 @Input({ required: true }) icon!: string;
12
13 get isEmoji(): boolean {
14 // Check if the icon is an emoji (starts with a non-ASCII character)
15 return this.icon.length > 0 && this.icon.charCodeAt(0) > 255;
16 }
17 }
18