0.0.19 • Published 3 years ago

@fster/react-modal v0.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-modal

This package is a part of an OpenClassrooms school project.

Installation

You need to use node >= 14 and npm >= 5.6. Run the following command on your project to install the package.

npm i @fster/react-modal@latest 

Dependencies

This package use react@18.2.0 as peer dependencies.

How to use ?

Props title and text are necessary. Use ìsVisible boolean props to render the modal. The default target is document.body.

  • Props type
export interface ModalProps {
  title: string;
  text: string;
  isVisible: Boolean;
  target: Element | DocumentFragment;
}
  • Example
import { Modal } from '@fster/react-modal'

function App () {
  return (
    <div className="App">
      <Modal
        title= 'Your Title'
        text= 'Your content text'
        isVisible= {true}
        target= {document.body}
      />
    </div>
  );
}

export default App;
0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago