0.1.7 • Published 9 months ago

react-personalized-modal v0.1.7

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

react-personalized-modal

A simple npm package for creating customizable modals in your React App.

Dependencies

  • react 18.2.0
  • react-dom 18.2.0
  • @babel/polyfill 7.12.1
  • core-js 3.32.0

Installation

Run the following command in your terminal:

npm install react-personalized-modal

or

yarn add react-personalized-modal

Usage

import { Modal } from "react-personalized-modal";

    <Modal
        open={isOpen}
        onCloseModal={handleCloseModal}
        message={message}
        containerStyle={{
            backgroundColor: 'white',
            color: 'black',
            width: '500px'
        }}
        closeButtonStyle={{
            backgroundColor: 'black',
            color: 'white',
            width: '30px',
            height: '30px'
        }}
        messageStyle={{
            fontSize: '20px',
            textAlign: 'center'
        }}
    />

Props Usage

  • open (boolean):

    • Whether the modal is open or closed.
  • onCloseModal (function):

    • A function to handle the modal close event.
  • message (string):

    • The message to be displayed inside the modal.
  • containerStyle (object, optional):

    • An object to customize the style of the modal container.
  • closeButtonStyle (object, optional):

    • An object to customize the style of the close button.
  • messageStyle (object, optional):

    • An object to customize the style of the message text.

Contributors

Developed by eliaexe

0.1.7

9 months ago

0.1.6

9 months ago

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago