
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-common-modal-module
Advanced tools
React Context API를 이용한 공통 Modal component 입니다.
npm install react-common-modal-module
# or
yarn add react-common-modal-module
// root index.jsx or App.jsx...
// ...
import { ModalContextProvider } from "react-common-modal-module";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<ModalContextProvider>
<App />
</ModalContextProvider>
);
Modal Contents는 기본 스타일이 적용되어 있지 않으며 중앙정렬이 되어 있습니다.
각각 컴포넌트를 openModal(arg1 : React.ReactNode)을 사용하여 적용합니다.
import { useModal } from "react-common-modal-module";
function App() {
const { openModal } = useModal();
const handleOpenModal = () => {
// modal component 커스텀
// React.ReactNode arg
openModal(<div>Modal Component</div>);
};
return (
<div>
<button onClick={handleOpenModal}>open modal</button>
</div>
);
}
background 배경이 fixed로 적용되어 있으며 배경 클릭시 closeModal이 동작하도록 되어있습니다.
import { useModal } from "react-common-modal-module";
function App() {
const { openModal, closeModal } = useModal();
const handleOpenModal = () => {
// modal component 커스텀
openModal(
<div>
Modal Component
<button onClick={closeModal}>close modal</button>
</div>
);
};
return (
<div>
<button onClick={handleOpenModal}>open modal</button>
</div>
);
}
버그를 발견했거나 기능 요청이 있는 경우 Issue 부탁드립니다.
FAQs
react common modal module
We found that react-common-modal-module 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.