
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
react-notification
Advanced tools
This is a component designed to provide "snackbar" notification messages.
Warning: this is a major version zero release. The component is still under development and the API may change at any time. Please report issues and bugs on GitHub.
npm install react-notification
var Notification = require('react-notification');
<Notfication
message={string}
action={string}
onClick={func}
/>
Name | Type | Description |
---|---|---|
message | string | The message for the notification |
action | string | The name of the action, e.g., "close" or "undo" |
Method | Usage | |
---|---|---|
show | Notification.show() | Opens the notification. |
hide | Notification.hide() | Hides the notifciation. |
Event | Description |
---|---|
onClick | Fuction runs on change |
As this component does not include CSS styles to use, you will need to add your own styles. The DOM tree of the component is included below for reference.
<div class="notficiation-bar">
<div class="notfication-bar-wrapper" onClick={this.props.onClick}>
<span class="notfication-bar-message">{this.props.message}</span>
<span class="notification-bar-action">{this.props.action}</span>
</div>
</div>
Built with care in New Orleans by Patrick Burtchaell.
Copyright 2014 Patrick Burtchaell. Licensed MIT.
FAQs
Snackbar notifications for React
The npm package react-notification receives a total of 3,267 weekly downloads. As such, react-notification popularity was classified as popular.
We found that react-notification demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.