0.1.5 • Published 4 years ago

custom-modal v0.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

custom-modal

A simple reat custom modal

🚀 Getting Started

Using npm:

npm i custom-modal

✨ Usage

import { Modal, showModal }  from 'custom-modal';
 
function DeepChild() {
  return (
    <div>
      <button onClick={() => {
            showModal({
                title: 'Modal test',
                message: 'This is a message'   
            })  
        }}>Show</button>
      
    </div>
  )
}
 
export default () => {
  return (
    <div className="main-app">
        <DeepChild/>
        <Modal/>
    </div>
  );
};

📌 Props

PropTypeDefaultRequired
optionsanyfalseNo

✌️ License

MIT