1.0.0 • Published 3 years ago

@emintontul/drawer v1.0.0

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

Drawer

This is a basic drawer component for angular.

Demo

npm.io

Installation

npm i @emintontul/drawer

Usage

You'll need to add MetDrawerModule to your application module.

import { MetDrawerModule, MetDrawerService } from '@emintontul/drawer';
...

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    MetDrawerModule,
    ...
  ],
  providers: [
      MetDrawerService,
      ...
    ],
  bootstrap: [AppComponent]
})

export class AppModule {
}

Add the met-drawer attribute:

import { Button, MetDrawerService } from '@emintontul/drawer';
@Component({
  selector: 'sample',
  template:`
  <met-drawer [isActive]="isDrawerActive" [buttons]="buttonArray" [title]="'Drawer Title'">
    HTML or something goes here...
  </met-drawer>
  `
})
class SampleDrawer {
  isDrawerActive: boolean = false;
  buttonArray: Button[] = new Array<Button>();
  constructor(private drawer: MetDrawerService){
    this.buttonArray.push({text: "Save", class: "btn btn-primary", callFunction: this.someFunction});
  }
  showDrawer(){
      this.drawer.showDrawer();
  }
  someFunction(){
      ...
  }
}

That's it! Now you can use drawer.

0.9.7

3 years ago

1.0.0

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.1.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.9.0

3 years ago

0.0.9

3 years ago

0.8.0

3 years ago

0.0.8

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.7.0

3 years ago

0.0.7

3 years ago

0.6.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.1

3 years ago