25 lines
742 B
TypeScript
25 lines
742 B
TypeScript
import { Component } from '@angular/core';
|
|
import { MatIconModule } from '@angular/material/icon';
|
|
import * as ALL_ICONS from '../../shared/ui/icons';
|
|
|
|
@Component({
|
|
selector: 'app-icon-preview',
|
|
standalone: true,
|
|
imports: [MatIconModule],
|
|
templateUrl: './icon-preview.component.html',
|
|
styleUrl: './icon-preview.component.scss',
|
|
})
|
|
export class IconPreviewComponent {
|
|
readonly icons = Object.entries(ALL_ICONS)
|
|
.filter(([key, val]) => typeof val === 'string' && key.endsWith('_ICON'))
|
|
.map(([constName, iconString]) => ({
|
|
constName,
|
|
iconString: iconString as string,
|
|
}))
|
|
.sort(
|
|
(a, b) =>
|
|
a.iconString.localeCompare(b.iconString) ||
|
|
a.constName.localeCompare(b.constName),
|
|
);
|
|
}
|