0.1.8 • Published 11 months ago

annween-modals v0.1.8

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

Modal Component

A reusable React component for managing modals. The component allows you to display a modal with a header, body, and a display button that can be initialized to true or false. Installation

Use npm or yarn to install the Modal component.

$ npm install modal
$ yarn install modal

Usage

Import the Modal component and use it in your React application.

import React from 'react';
import Modal from 'modal';

function App() {
    return (
        <div>
            {/* Your app content */}
            <Modal header="Modal Header" body="Modal Content" displayButton={true} />
        </div>
    );
}
export default App;

Props

The Modal component accepts the following props:

- isVisible property (boolean): Specifies whether the modal should be visible or hidden.
- Header (string): The header text of the modal.
- Body (string): The body of the modal.
- displayButton (boolean): Specifies whether the display button should be shown or hidden.

Example

Here's an example of using the Modal component with different props:

<Modal isVisible={true} header="Welcome" body="Modal Content" displayButton={false} />

This will render a modal without a display button.

Development

To run the development environment, follow these steps:

Clone the repository:

git clone https://github.com/Annween/modal.git

Install the dependencies:

$ npm install

Start the development server:

$ npm start

Open your browser and navigate to http://localhost:3000 to see the demo.

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

12 months ago

0.1.0

12 months ago