icons/src/icon/icon.component.ts
This Angular implementation of @talenra/icons provides a simple and comfortable way to use the Opus icons in
Angular apps.
<talenra-icon name="attach-file" />Icons are available in three sizes:
'xs', 16 × 16px's', 20 × 20px'm', 24 × 24px (default)<!-- Template -->
<talenra-icon name="attach-file" size="xs" />As for regular single-colored icons, the colors of duplex icons is typically set in your custom stylesheet. In very
rare cases, you might need to set the color via the element's style attribute (e.g. if the color can be customized
by the user or is picked randomly).
<!-- Template -->
<talenra-icon name="person-checkmark-duplex" />
<talenra-icon name="task-alt-duplex" class="neon-colors" />// Stylesheet
// Set default colors used for duplex icons in your app
.talenra-icon-duplex {
--color-primary: black;
--color-secondary: red;
}
// Override default colors set above
.neon-colors {
--color-primary: deeppink;
--color-secondary: deepskyblue;
}import { IconComponent } from '@talenra/components/icons';| changeDetection | ChangeDetectionStrategy.OnPush |
| host | { |
| selector | talenra-icon |
| styleUrl | ./icon.component.scss |
Inputs |
| name |
Type : string
|
Default value : ''
|
|
The name of the icon to be rendered. e.g. |
| size |
Type : TIconSize | null
|
Default value : null
|
|
The size of the icon. For backwards compatibility, you can omit the size property which makes it easier to override the size via CSS (which is not recommended though). Example :See TIconSize |
https://gitlab.svanet.ch/talenra/talenra-workspace/-/merge_requests/747