1.0.10 • Published 1 year ago

modal-axido v1.0.10

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

Modal Axido React Component

ModalAxido is a simple React component displays a modal containing text passed through props.

Installation

To install, you can use npm or yarn:

$ npm install --save modal-axido

$ yarn add modal-axido

Example

Here's an example of using ModalAxido:

import React, { useState } from 'react';
import ModalAxido from 'modal-axido';

function Example() {
  const [modalOpen, setModalOpen] = useState(false);

  const handleModalClose = () => {
    setModalOpen(false);
  };

  return (
    <div>
      <button onClick={() => setModalOpen(true)}>Open Modal</button>
      <ModalAxido
        textModal="Hello, this is a sample modal!"
        handleClose={handleModalClose}
        isOpen={modalOpen}
      />
    </div>
  );
}

export default Example;

Props definitions

textModal: String, the text to display in the modal. handlClose: Function, the function to call to close the modal. isOpen: Boolean, determines whether the modal is displayed or not.

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago