UNPKG

@ozen-ui/icons

Version:

A collection of icons

25 lines (24 loc) 798 B
var Icons = /** @class */ (function () { function Icons(icons) { this.icons = icons; this.byGroup = this.getByGroup(); } Icons.prototype.getByComponentName = function (componentName) { return this.icons.find(function (meta) { return meta.componentName === componentName; }); }; Icons.prototype.getByName = function (name) { return this.icons.find(function (meta) { return meta.name === name; }); }; Icons.prototype.getByGroup = function () { var byGroup = {}; this.icons.forEach(function (icon) { if (!byGroup[icon.group]) { byGroup[icon.group] = []; } byGroup[icon.group].push(icon); }); return byGroup; }; return Icons; }()); export { Icons };