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.
Awesome and simple prompt components
with mui-prompt you can easily ask user for confirmation before executing an important action
Mui-Prompt uses standard theme provider and will take your theme aswell!
nikandlv@nikandlv.ir:~$ npm i mui-prompt
import Prompt from "mui-prompt";
export default class PromptDemo extends React.Component {
render() {
function simplePrompt() {
Prompt.ask("simple", {
callback: status => {
console.log(status);
},
});
}
return (
<div>
<Prompt.View />
<button onClick={simplePrompt}>click me!</button>
</div>
);
}
}
Prompt.ask first parameter is the key
of dialog and second parameter is the configuration which can be these values
const config = {
callback: callback,
title: "Are you sure?",
body: "This action can not be undone!",
cancel: "Cancel",
continue: "Continue",
nested: false,
};
Note:
nested
should be only applied on the parents and not the last nested item
In order to use inline variant simply wrap your Button
, IconButton
or any other component you want with Prompt.Inline
component
export default class InlineDemo extends React.Component {
render() {
return (
<div>
<Prompt.Inline variant="button">
<button onClick={simplePrompt}>click me!</button>
</Prompt.Inline>
<Prompt.Inline variant="icon">
<button onClick={simplePrompt}>click me!</button>
</Prompt.Inline>
</div>
);
}
}
<Prompt.Inline
variant={"button" || "icon"}
cancelText="Cancel"
continueText="Continue"
cancelIcon={CancelIcon}
continueIcon={DeleteIcon}
callback={callback}
/>
FAQs
Easy, simple, stackable and global prompt and popover
We found that mui-prompt 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.