1.0.1 • Published 3 years ago

@streamlinehq/streamline-wrapper-angular v1.0.1

Weekly downloads
89
License
MIT
Repository
github
Last release
3 years ago

Angular wrapper for Streamline icons and illustrations

This is a small Angular library which allows you to render Streamline SVG icons and illustrations.

How to install

yarn add @streamlinehq/streamline-wrapper-angular

How to use

Check docs/example-angular-app project to see it in use.

  1. Import the module
// in your module, eg app.module.ts
import {StreamlineIconModule} from '@streamlinehq/streamline-wrapper-angular';

// Then add it to imports array:

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    StreamlineIconModule, // <-- this line
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  1. Define the icon
// in your component, eg app.component.ts

import { Component } from '@angular/core';
import HouseIcon from './icon'; // <-- this line, can be any svg icon from Strealine

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent {
  title = 'example-angular-app';
  public icon = HouseIcon; // <-- this line, variable can have any name
}
  1. Render the icon in your template, eg in app.component.html
<streamline-icon [icon]="icon"></streamline-icon>

Note that you can import the Icon type from the package as well.

1.0.1

3 years ago

1.0.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago