
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
react-modallink
Advanced tools
Creates a modal and a link to open the modal
npm install react-modallink --save
# MyModal.jsx
var Modal = require('react-modallink').Modal;
var MyModal = React.createClass({
render: function () {
return (
<Modal {...this.props}>
<header>Modal</header>
<p>{this.props.something}</p>
</Modal>
);
}
});
var MyModal = require('./MyModal.jsx');
var ModalLink = require('react-modallink').ModalLink;
var ComponentWithModalLink = React.createClass({
render: function () {
return (
<div>
<ModalLink modal={<MyModal something="anything" />}>
<a>Open modal</a>
</ModalLink>
</div>
);
}
});
.overlay {
box-sizing: content-box;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.8);
overflow: auto;
color: #272b34;
font-size: 1rem;
z-index: 9999;
}
.overlay.hidden {
display: none;
}
.overlay-top {
box-sizing: content-box;
position: relative;
width: 699px;
margin: 4% auto;
}
.overlay-content {
box-sizing: content-box;
position: relative;
width: 699px;
margin: 0 auto;
margin-bottom: 4%;
padding: 22.5px 30px;
background-color: #F3F4F7;
border-radius: 4px;
}
.overlay-close {
box-sizing: content-box;
position: absolute;
top: 25.5px;
right: 26px;
cursor: pointer;
z-index: 2000;
padding: 0;
color: #CED3E1;
font-size: 4em;
font-weight: 300;
line-height: 1em;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
}
Inspired by and modified from react-bootstrap and cupcake-react-modal.
FAQs
Creates a modal and a link to open the modal
The npm package react-modallink receives a total of 10 weekly downloads. As such, react-modallink popularity was classified as not popular.
We found that react-modallink 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.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.