ng2-floating-action-menu
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "ng2-floating-action-menu", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
111
README.MD
@@ -5,4 +5,2 @@ # ng2-floating-action-menu | ||
To install this library, run: | ||
```bash | ||
@@ -12,12 +10,4 @@ $ npm install ng2-floating-action-menu --save | ||
## Consuming your library | ||
## usage | ||
Once you have published your library to npm, you can import your library in any Angular application by running: | ||
```bash | ||
$ npm install ng2-floating-action-menu | ||
``` | ||
and then from your Angular `AppModule`: | ||
```typescript | ||
@@ -48,5 +38,6 @@ import { BrowserModule } from '@angular/platform-browser'; | ||
Once your library is imported, you can use its components, directives and pipes in your Angular application: | ||
```<ng2-floating-action-menu | ||
**component.html** | ||
```xml | ||
<ng2-floating-action-menu | ||
[placement]="config.placment" | ||
@@ -62,4 +53,98 @@ [effect]="config.effect" | ||
**component.ts** | ||
```typescript | ||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
export class AppComponent { | ||
title = 'app'; | ||
config; | ||
buttons: Array<FloatingActionButton> = [ | ||
{ | ||
iconClass: 'ion-social-github', | ||
label: 'follow me on github', | ||
onClick: function(){ | ||
} | ||
}, | ||
{ | ||
iconClass: 'ion-social-facebook', | ||
label: 'follow me on facebook', | ||
onClick: function(){ | ||
} | ||
}, | ||
{ | ||
iconClass: 'ion-social-linkedin', | ||
label: 'linkedin', | ||
onClick: function(){ | ||
} | ||
}, | ||
]; | ||
placements = [ | ||
{ | ||
value: 'br', | ||
key: 'bottom right' | ||
}, | ||
{ | ||
value: 'bl', | ||
key: 'bottom left' | ||
}, | ||
{ | ||
value: 'tr', | ||
key: 'top right' | ||
}, | ||
{ | ||
value: 'tl', | ||
key: 'top left' | ||
}, | ||
]; | ||
effects = [ | ||
{ | ||
value: 'mfb-zoomin', | ||
key: 'Zoom In' | ||
}, | ||
{ | ||
value: 'mfb-slidein', | ||
key: 'Slide In + Fade' | ||
}, | ||
{ | ||
value: 'mfb-fountain', | ||
key: 'Fountain' | ||
}, | ||
{ | ||
value: 'mfb-slidein-spring', | ||
key: 'Slide In (Spring)' | ||
} | ||
]; | ||
toggles = [ | ||
'click', | ||
'hover' | ||
]; | ||
constructor() { | ||
this.config = { | ||
placment: 'br', | ||
effect: 'mfb-zoomin', | ||
label: 'main button label', | ||
iconClass: 'ion-plus-round', | ||
activeIconClass: 'ion-close-round', | ||
toggle: 'click', | ||
buttons: this.buttons | ||
}; | ||
} | ||
} | ||
``` | ||
## License | ||
MIT © [Shalva Jashiashvili](mailto:sh.jashiashvili@gmail.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121713
147