New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mg_modal

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mg_modal

A simple and reusable React modal component

latest
Source
npmnpm
Version
1.0.8
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

MG Modal

A simple React modal component.

Requirements

  • Node.js version: >=16.x
  • Package manager: npm
  • Recommended editor: Visual Studio Code

Installation

npm install mg_modal

Usage

import React, { useState } from 'react';
import MgModal from 'mg_modal';

const App() => {
  const [showModal, setShowModal] = useState(false);
  
  return (
    <div>
      <button onClick={() => setShowModal(true)}>Open Modal</button>
      
      <MgModal
        isOpen={showModal}
        setIsOpen={setShowModal}
        title="My Modal"
        body="This is my modal content."
      />
    </div>
  );
}

Props

ProptypeDescription
isOpenbooleanControls modal visibility
setIsOpenfunctionState setter function to update visibility
titlestringModal title (optional)
bodystringModal content

Development

To clone the component locally

# Clone the repository
git clone https://github.com/manelgasmi/mg_modal.git

License

MIT

Keywords

react

FAQs

Package last updated on 17 May 2025

Did you know?

Socket

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.

Install

Related posts