package-hrnet-modale 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
# voici mon module modale
|
|
2
|
+
|
|
2
3
|
Ma modale sert à ouvrir une fenêtre modale qui affiche un message et un bouton pour fermer la modale.
|
|
3
4
|
|
|
4
5
|
# caractéristiques
|
|
6
|
+
|
|
5
7
|
entièrement personnalisable grace aux 'props' et aux 'styles'
|
|
6
|
-
section title content
|
|
7
|
-
utilisation par défaut ou se servir des styles modifiables 'overlay'
|
|
8
|
+
section title, content.
|
|
9
|
+
utilisation par défaut ou se servir des styles modifiables 'overlay'et'modal'
|
|
10
|
+
|
|
8
11
|
# Installation
|
|
12
|
+
|
|
9
13
|
installer le composant via npm:
|
|
14
|
+
|
|
10
15
|
```
|
|
11
16
|
npm install package-hrnet-modale
|
|
12
17
|
```
|
|
13
18
|
|
|
14
19
|
# Utilisation
|
|
20
|
+
|
|
15
21
|
import React, {useState} from react;
|
|
16
22
|
import Modale from "your-modal-package-name";
|
|
17
23
|
|
|
18
24
|
const App = () => {
|
|
19
|
-
|
|
25
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
20
26
|
|
|
21
27
|
return (
|
|
22
28
|
<div>
|
|
@@ -36,23 +42,39 @@ const App = () => {
|
|
|
36
42
|
</Modale>
|
|
37
43
|
</div>
|
|
38
44
|
);
|
|
45
|
+
|
|
39
46
|
};
|
|
40
47
|
export default App;
|
|
41
48
|
|
|
42
49
|
lancer le serveur avec la commande :
|
|
50
|
+
|
|
43
51
|
```
|
|
44
52
|
npm run start
|
|
45
53
|
```
|
|
54
|
+
|
|
46
55
|
# Fonctionnalités
|
|
47
|
-
|
|
56
|
+
|
|
57
|
+
La modale est un composant React qui peut être utilisé dans une application pour afficher une modale avec un message et un bouton pour fermer la fenêtre.
|
|
58
|
+
|
|
59
|
+
| Propriété | Type | Description | Valeur par défaut |
|
|
60
|
+
| ---------------------- | ------------ | ------------------------------------------- | ----------------- |
|
|
61
|
+
| `isOpen` | `boolean` | Affiche ou cache la modale. | `false` |
|
|
62
|
+
| `close` | `() => void` | Fonction pour fermer la modale. | `undefined` |
|
|
63
|
+
| `title` | `string` | Titre affiché en haut de la modale. | `""` |
|
|
64
|
+
| `style` | `object` | Styles personnalisés pour l’overlay, etc. | `{}` |
|
|
65
|
+
| `closeLabel` | `string` | Texte ou icône pour le bouton de fermeture. | `"x"` |
|
|
66
|
+
| `closeButtonClassName` | `string` | Classe CSS pour le bouton de fermeture. | `"modale-close"` |
|
|
67
|
+
| `onClose` | `() => void` | Fonction appelée à la fermeture. | `close` |
|
|
48
68
|
|
|
49
69
|
# Auteur
|
|
70
|
+
|
|
50
71
|
je suis un développeur web junior, je suis passionné par la programmation et j'aime créer des applications web.
|
|
51
72
|
|
|
52
73
|
# Contact
|
|
53
|
-
|
|
74
|
+
|
|
75
|
+
vous pouvez me contacter par email à l'adresse suivante :
|
|
54
76
|
```
|
|
55
|
-
jeaan-claude.grech@orange.fr
|
|
77
|
+
jeaan-claude.grech@orange.fr
|
|
56
78
|
|
|
57
79
|
```
|
|
58
|
-
|
|
80
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "package-hrnet-modale",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "webpack",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [],
|
|
11
|
-
"author": "",
|
|
11
|
+
"author": "jean-claude Grech",
|
|
12
12
|
"license": "ISC",
|
|
13
|
-
"description": "",
|
|
13
|
+
"description": "A customizable modal component for React.",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"package-hrnet-modale": "^1.0.2",
|
|
16
16
|
"react": "^18.3.1",
|