Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
bpk-component-banner-alert
Advanced tools
Backpack banner alert component.
npm install bpk-component-banner-alert --save-dev
import React from 'react';
import BpkBannerAlert, { ALERT_TYPES } from 'bpk-component-banner-alert';
export default () => (
<BpkBannerAlert
message="Successful alert with more information."
type={ALERT_TYPES.SUCCESS}
/>
);
import React, { Component } from 'react';
import { ALERT_TYPES, BpkBannerAlertDismissable } from 'bpk-component-banner-alert';
class DismissableBpkBannerAlert extends Component {
constructor() {
super();
this.state = {
show: true,
};
}
setDismissed = () => {
this.setState({
show: false,
});
}
render() {
return (
<BpkBannerAlertDismissable
message="Successful alert with dismiss option."
type={ALERT_TYPES.SUCCESS}
onDismiss={this.setDismissed}
show={this.state.show}
dismissButtonLabel="Dismiss"
/>
);
}
}
export default () => (
<DismissableBpkBannerAlert />
);
import React, { Component } from 'react';
import { ALERT_TYPES, withBannerAlertState, BpkBannerAlertDismissable, BpkBannerAlertExpandable } from 'bpk-component-banner-alert';
const BannerAlertDismissableState = withBannerAlertState(BpkBannerAlertDismissable);
const BannerAlertExpandableState = withBannerAlertState(BpkBannerAlertExpandable);
<BannerAlertDismissableState
dismissButtonLabel="Dismiss"
message="Successful alert with dismiss option."
type={ALERT_TYPES.SUCCESS}
/>
<BannerAlertDismissableState
message="Successful alert that will disappear after 5 seconds."
hideAfter={5}
type={ALERT_TYPES.SUCCESS}
/>
<BannerAlertExpandableState
message="Successful alert with expandable option."
type={ALERT_TYPES.SUCCESS}
toggleButtonLabel="View more"
>
Lorem ipsum dolor sit amet.
</BannerAlertExpandableState>
Property | PropType | Required | Default Value |
---|---|---|---|
type | ALERT_TYPES (one of) | true | - |
message | node | true | - |
animateOnEnter | bool | false | false |
animateOnLeave | bool | false | false |
bannerClassName | string | false | null |
icon | BpkIcon | false | null |
show | bool | false | true |
Property | PropType | Required | Default Value |
---|---|---|---|
type | ALERT_TYPES (one of) | true | - |
message | node | true | - |
animateOnEnter | bool | false | false |
animateOnLeave | bool | false | false |
bannerClassName | string | false | null |
dismissButtonLabel | string | false | null |
icon | BpkIcon | false | null |
onDismiss | func | false | null |
show | bool | false | true |
Property | PropType | Required | Default Value |
---|---|---|---|
type | ALERT_TYPES (one of) | true | - |
message | node | true | - |
animateOnEnter | bool | false | false |
animateOnLeave | bool | false | false |
bannerClassName | string | false | null |
expanded | bool | false | false |
icon | BpkIcon | false | null |
onExpandToggle | func | false | null |
show | bool | false | true |
toggleButtonLabel | string | false | null |
Property | PropType | Required | Default Value |
---|---|---|---|
hideAfter | number | false | null |
onHide | func | false | null |
bannerAlertPrimaryColor
bannerAlertSuccessColor
bannerAlertWarnColor
bannerAlertErrorColor
FAQs
Backpack banner alert component.
The npm package bpk-component-banner-alert receives a total of 509 weekly downloads. As such, bpk-component-banner-alert popularity was classified as not popular.
We found that bpk-component-banner-alert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.