0.0.6 • Published 4 months ago

jattac.libs.web.modal v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

ModalDialog Component

A complete and simple to use React component for creating modal dialogs.

Installation

npm i jattac.libs.web.modal

Example

import React, { Component, ReactNode } from 'react';
import ModalDialog from 'jattac.libs.web.modal';

interface YourComponentProps {
  isOpen: boolean
}

class YourComponent extends Component<YourComponentProps> {
  render(): ReactNode {
    return (
      <ModalDialog isOpen={this.props.isOpen} onClose={() => console.log('Modal closed')}>
        <div>
          {/* Your modal content goes here */}
        </div>
      </ModalDialog>
    );
  }
}

Props

  • isOpen (boolean, required): Controls whether the modal is open or closed.
  • children (ReactNode, required): The content to be displayed inside the modal.
  • onClose (function, required): Callback function to be executed when the modal is closed.
0.0.5

4 months ago

0.0.6

4 months ago

0.0.3

5 months ago

0.0.4

5 months ago

0.0.2

6 months ago

0.0.1

6 months ago