Skip to content

addIcons Type documentation

<(T: string)> (icons: Record<T, string>) => Record<T, string>
Function
Adds the provided icons. It requires an Angular InjectionContent. The Icons are available until the component is destroyed. Call this function only in the component which actually uses the icon. Importing all icons on the global level is discouraged.

When using a string instead of the object to use an icon, use the kebab-case version of the icon name.

Example:
import { elementIcon } from '@simpl/element-icons/ionic';
import { addIcons } from '@siemens/element-ng/icon'

@Component({`<si-icon-next [icon]="icons.elementIcon"`})
class MyComponent {
  icons = addIcons({ elementIcon })
}
Parameters
icons: Record<T, string>

Types Documentation

No types to document for items on this page.


Except where otherwise noted, content on this site is licensed under MIT License.