0.1.4 • Published 1 year ago

p14-modal-validate-plugin v0.1.4

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

React CSS3 NPM Yarn

Modal validate component

This is a simple and reutilisable React component fullscreen modal validate, developed as part of OpenClaasrooms training program for the 14th project. Its job is very basic ➡️ to display an alert when a form is validated.

Prerequisites

To use this component, you need :

Installation

$ npm install p14-modal-validate-plugin

ou

$ yarn add p14-modal-validate-plugin

How the plugin works

Import module

import ModalValidate from 'p14-modal-validate-plugin'

Render your modal into your component

return (  
  <>
    <ModalValidate />
  <>
)

Props

This component uses three kinds of props :

  • show : Boolean ▶️ manage the modal's display
  • onClose : Function ▶️ handle the close's event
  • message : String ▶️ display the alert message

Exemple :

  < ModalValidate onClose={() => {
      setShow(false)}}  
      show={ show } message={ 'Your message here !' }/>

Compatibility

This component was created with the last version of React (v18.2.0).

🤓 If you want to know more about this plugin, feel free to contact me !

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago