
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ng2-float-btn
Advanced tools
Button group for angular 2 and angular material 2.
npm install ng2-float-btn --save
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from "@angular/forms"
import { MaterialModule } from '@angular/material';
import { AppComponent } from './app.component';
import { Ng2FloatBtnModule } from 'ng2-float-btn';
@NgModule({
imports: [
MaterialModule.forRoot(),
Ng2FloatBtnModule
],
declarations: [AppComponent],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
import { Component } from '@angular/core';
import { Ng2FloatBtnComponent, Ng2FloatBtn } from 'ng2-float-btn';
@Component({
selector: 'test-app',
template: `
<ng2-float-btn [mainButton]="mainButton" [buttons]="buttons" [isMini]="true" [direction]="'right'">
<div style="z-index:400; position: absolute; bottom: 0;">
<ng2-float-btn [mainButton]="mainButton" [buttons]="buttons" [direction]="'up'">
</ng2-float-btn>
</div>
`
})
export class AppComponent {
mainButton: Ng2FloatBtn;
buttons: Array<Ng2FloatBtn>;
public constructor() {
this.mainButton = {
color: "primary",
iconName: "check"
}
this.buttons = [
{
color: "primary",
iconName: "add",
onClick: () => {
alert("buton 1 clicked");
},
label : "button 1"
},
{
color: "primary",
iconName: "remove",
onClick: () => {
alert("buton 2 clicked");
},
label : "button 2"
}
]
}
}
Ng2FloatBtn
Property | Type | Description |
---|---|---|
color | string | The color of the button. Can be primary , accent , or warn (Reference) |
iconName | string | The name of the material icon. Refer to here |
onClick(optional) | any | The callback function when the button clicked |
label(optional) | string | The label of the button |
Attribute | Type | Description |
---|---|---|
mainButton | Ng2FloatBtn | The main button of the button group. label and onClick will be ignored. |
buttons | Array | The array of button of the collapsed button. |
direction | string | The direction that the collapsed fab should expand to when the main button get clicked. Can be right , left , up and down |
FAQs
Button group for angular 2 and angular material 2.
We found that ng2-float-btn demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.