import {Component} from "@angular/core";
@Component({
selector: 'icons-preview',
template: `
Icons
Usage
- 1. Import IconsModule
- 2. Add this to your module with these icons you will need
constructor(private iconsService: IconsService) {{ "{" }}
this.iconsService.registerIcons([edit]);
{{ "}" }}
- 3. Use an icon with icon tag. Add parameter ratio to scale this icon. Default size 20x20 (ratio: 1)
{{'<'}}icon name="edit"{{'><'}}/icon{{'>'}}
- 4. Add a color class in parent of icon to give your icon a color.
{{'<'}}div class="uk-text-secondary"{{'>'}}
{{'<'}}icon name="edit"{{'><'}}/icon{{'>'}}
{{'<'}}/div{{'>'}}
Add a new icon
- 1. Go to Material Icons
- 2. Find your icon and download it as svg.
- 3. Open svg file with an editor and change width and height to 20
- 4. Create an entry on icons file with your new icon.
`
})
export class IconsPreviewComponent {
}