Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-mega-modal

stphnnnn3MITdeprecated0.1.4

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

A simple modal component for React

react, modal, popup, overlay

readme

✨ React Mega Modal

React Mega Modal is a simple modal component for React.

Basic Usage

  1. The easiest way to use react-mega-modal is to install it from npm:

npm i react-mega-modal

  1. Then use it in your react app:
import React from 'react';
import Modal from 'react-mega-modal';

const App = () => (
  <Modal
    modal={({ closeModal }) => (
      <div>
        <h1>This is the modal content</h1>
        <button onClick={closeModal}>Close</button>
      </div>
    )}
  >
    {({ openModal }) => <button onClick={openModal}>Open</button>}
  </Modal>
);