Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
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 3 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.