@streamlinehq/streamline-wrapper-angular
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    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.

    Install

    npm i @streamlinehq/streamline-wrapper-angular

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    59.6 kB

    Total Files

    17

    Last publish

    Collaborators

    • cbrwizard
    • vlemoign
    • victorcarvalhosp