Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
reactive-hermes
Advanced tools
A notification manager for react. Animated, customizable, light and cleaner, allows you to controll duration, sound, and even use other react components inside of messages.
Hermes is a notification message manager.
It deals with your messages in your page's interface.
It manages multiple messages at a time.
It's cleaner, ligher.
It allows you to use react components within the message, making it a powerfull tool.
It can be used to replace other messagers. Has a lighter, malleable design and animations.
You can even manage messages by id or simulate a loading controller.
Take a look.
See how to do this in the examples below.
Test it live, in the demo tool.
npm install --save reactive-hermes
You need to import and add the HermesComponent
to your interface.
You should do that once, let's say, in your root page for example.
import { HermesComponent } from 'reactive-hermes'
[...]
<HermesComponent />
Now, you can access the global Hermes
object, or import it in your modules and then use its API, described below.
Let's see some of the cool things you can do with it!
You can send some props to enforce a default behavior:
(2) Page Title
.playAudio
attribute in the tag to use a default audio or pass a value to it with an Audio Object (to customize the audio).<HermesComponent
defaultDuration={999}
updateTitleCounter
playAudio={new Audio(...)}
animate />
These are methods you can access at Hermes
:
Hermes.message(String)
This is an easy way to show a message.
Hermes.message(Object)
This is the advanced way to show messages.
It accepts an object with:
default
, warn/warning
, error/fail
, info
or success
playAudio
attribute for this particular message. May be true/false
or an AudioObjectid
. May only be closed programaticallyHermes.updateMessage(Object)
Allows you to update an existing message. If the message is not opened, it will be shown.
The object must have an id
for the message to be updated.
Hermes.closeMessage(String/Number)
Closes an open message with the given id
Aliases work just like the methods, but using different default values.
Hermes.message
passing type 'info'.Hermes.message
passing type 'warn'.Hermes.message
passing type 'error'.Hermes.message
passing type 'success'.Are you using methods like showWarning
and showSuccess
?
No problem, you can just import them from Hermes
too!
import { showerror, showSuccess } from 'reactive-hermes'
See some ways you can show messages
let message = 'You have been warned!';
Hermes.warn(message);
// show the warning, animating its icon
Hermes.warn(message, { animate: true });
Hermes.message({
type: 'warn',
body: message
})
Result:
let message = 'Something is out of order';
Hermes.fail(message);
Hermes.error(message);
Hermes.error(message, { /* options */ });
Hermes.message({
type: 'error',
body: message
})
Result:
let message = 'Info messages, wohoo!!';
Hermes.info(message);
// show info and play audio
Hermes.info(message, { playAudio: true });
Hermes.message({
type: 'info',
body: message
})
Result:
let message = 'Yet another useless message';
Hermes.message({
body: message,
id: 'myMessageId',
locked: true
})
Result:
let message = 'Saving...';
Hermes.message({
body: message,
id: 'savingMsg',
locked: true,
animate: true
})
Then, some time later...
Hermes.updateMessage({
body: 'Saved',
id: 'savingMsg',
locked: true,
animate: false,
duration: 3 // 3 seconds
})
Result:
Hermes.message(<div>Content here :)</div>)
// or
Hermes.message({
// ...
body: <SomeComponent prop1={val} />
// ...
})
Result:
You can add changes to the following CSS selectors:
x
button in unlocked messages, to close themFeel free to contribute to this project by sending Pull Requests, reporting problems or even sending suggestions.
Just remember to follow the community terms/rules/good practices :)
Once you've cloned the project...
Install:
npm install
Start the server (this will also enable the live/hot reload for the component):
npm start
Make chages:
Work in the src/
files, or in the demos/src/
files, or in css/
files.
Build:
npm run build
Then push it and open a PR :)
FAQs
A notification manager for react. Animated, customizable, light and cleaner, allows you to controll duration, sound, and even use other react components inside of messages.
We found that reactive-hermes 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.