1.0.9 • Published 10 months ago

ben-modal-component v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Modal Component by BenjGit

This is a modal component for react.

Getting Started

Install this package:

npm add ben-modal-component

Import the Modal component:

import { Modal } from "ben-modal-component";

You can then render the Modal as follow:

<Modal
        isOpen={showSuccessModal}
        onClose={handleCloseSuccessModal}
>
    Employee Created // you can put div span or whatever you want inside it
</Modal>

The modal will look like this :

image of the react modal

By default the modal take the width and height depending of the content inside it (width:auto and height:auto by default). But you can change style if you want :

The following default styles applied to the modal component can be changed :

width, height, borderRadius, backgroundColor, padding

<Modal
        isOpen={showSuccessModal}
        onClose={handleCloseSuccessModal}
        width='200px'
        height='200px'
        borderRadius='5px'
        backgroundColor='#000'
        padding='20px'
>
    Employee Created 
</Modal>
1.0.9

10 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago