
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
@surinderlohat/react-dialog
Advanced tools
Show Dialogs with easy way in react JS, super easy to use and can handel all the major user cases. ##### Based on the React hooks and reactive programing. #### No extra dependencies pure react js code & lightweight.
Show Dialogs with easy way in react JS, super easy to use and can handel all the major user cases.
npm install @surinderlohat/react-dialog
or
yarn add @surinderlohat/react-dialog
import { FC } from 'react';
import { DialogProvider } from '@surinderlohat/react-dialog';
import BootstrapDialog from './BootstrapDialog';
import MUIDialog from './MUIDialog';
// App.tsx
const App: FC = () => {
return (
<DialogProvider>
<BootstrapDialog />
<MUIDialog />
</DialogProvider>
);
};
export default App;
import { FC } from 'react';
import { Box, Button, Dialog, DialogTitle } from '@mui/material';
import { useDialog } from '@surinderlohat/react-dialog';
const MuiDialog: FC = () => {
const dialog = useDialog();
// Show MUI Dialog
const showMuiDialog = () => {
dialog.openDialog(
<Dialog open={true} onClose={() => dialog.closeDialog()}>
<DialogTitle>MUI Dialog Example</DialogTitle>
<p>Welcome to react dialog</p>
</Dialog>
);
};
return (
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
<Button onClick={showMuiDialog}>SHOW MUI DIALOG </Button>
</Box>
);
};
export default MuiDialog;
import { FC } from 'react';
import { useDialog } from '@surinderlohat/react-dialog';
import { Modal, Button } from 'react-bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
const BootstrapDialog: FC = () => {
const dialog = useDialog();
// Show Bootstrap Dialog
const showBootstrapDialog = () => {
dialog.openDialog(
<Modal.Dialog>
<Modal.Header closeButton>
<Modal.Title>Bootstrap Dialog Example</Modal.Title>
</Modal.Header>
<Modal.Body>
<p>Modal body text goes here.</p>
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={() => dialog.closeDialog()}>
Close
</Button>
<Button variant="primary">Save changes</Button>
</Modal.Footer>
</Modal.Dialog>
);
};
return (
<div>
<Button onClick={showBootstrapDialog}>Show Dialog</Button>
</div>
);
};
export default BootstrapDialog;
MIT Free Software!
FAQs
Show Dialogs with easy way in react JS, super easy to use and can handel all the major user cases. ##### Based on the React hooks and reactive programing. #### No extra dependencies pure react js code & lightweight.
We found that @surinderlohat/react-dialog 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.