Create RccIconService and corresponding RccIconComponent
Disclaimer: This issue is kind of half baked. I plan to add more details soon, but if someone wants to start with it right away with to sparse information I provided here, go for it :) I am happy to explain things on the fly.
The here goal is to have an RccIconComponent that takes an icon name an optional icon size as inputs and adds a corresponding SVG to the DOM, ready to be styled.
@Component({
selector: 'rcc-icon'
//...
})
export class RccIconComponent {
@Input()
name: string
@Input()
size: string = 'medium'
//..
}
Requirements
- Icons that are not used by any module should not be added to the bundle (see article below)
- Add a script to process the SVG files to clean up and minimize them
- It should be possible to apply styles to the output for coloring
- Should support multiple sets of icons
Where to start?
- Take a look at this article: How to create an icon library in Angular
Where do the icons come from?
The icons are SVG files at some random folder, that need to be imported by a script. See article.
Edited by Andreas Pittrich