@behivetech/molecules.confirm-dialog 0.2.3 → 0.2.4
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 +3 -1
- package/docs.json +71 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# ConfirmDialog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A `Modal` pre-wired with a message and confirm/cancel actions, for "are you sure?" moments such as confirming a delete.
|
|
4
|
+
|
|
5
|
+
Docs: https://bht-galaxy.vercel.app/behivetech/molecules/confirm-dialog
|
|
4
6
|
|
|
5
7
|
## Usage
|
|
6
8
|
|
package/docs.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://github.com/behivetech/bht-component-registry/docs.schema.json",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"generatedAt": "2026-10-23T19:01:33.019Z",
|
|
5
|
+
"docs": [
|
|
6
|
+
{
|
|
7
|
+
"displayName": "ConfirmDialog",
|
|
8
|
+
"description": "A `Modal` pre-wired with a message and confirm/cancel actions, for \"are you\nsure?\" moments — e.g. confirming a delete.",
|
|
9
|
+
"extendsNative": false,
|
|
10
|
+
"props": [
|
|
11
|
+
{
|
|
12
|
+
"name": "message",
|
|
13
|
+
"type": "ReactNode",
|
|
14
|
+
"required": true,
|
|
15
|
+
"defaultValue": null,
|
|
16
|
+
"description": "Confirmation message/body content"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "onConfirm",
|
|
20
|
+
"type": "() => void",
|
|
21
|
+
"required": true,
|
|
22
|
+
"defaultValue": null,
|
|
23
|
+
"description": "Called when the confirm button is clicked, before the dialog closes"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "onOpenChange",
|
|
27
|
+
"type": "(open: boolean) => void",
|
|
28
|
+
"required": true,
|
|
29
|
+
"defaultValue": null,
|
|
30
|
+
"description": "Called when the dialog should close (cancel, confirm, backdrop click, Escape)"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "open",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"required": true,
|
|
36
|
+
"defaultValue": null,
|
|
37
|
+
"description": "Whether the dialog is open"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "title",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"required": true,
|
|
43
|
+
"defaultValue": null,
|
|
44
|
+
"description": "Dialog title"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "cancelLabel",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"required": false,
|
|
50
|
+
"defaultValue": "Cancel",
|
|
51
|
+
"description": "Cancel button label; defaults to \"Cancel\""
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "confirmLabel",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"required": false,
|
|
57
|
+
"defaultValue": "Confirm",
|
|
58
|
+
"description": "Confirm button label; defaults to \"Confirm\""
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "variant",
|
|
62
|
+
"type": "\"default\" | \"danger\"",
|
|
63
|
+
"required": false,
|
|
64
|
+
"defaultValue": "default",
|
|
65
|
+
"description": "Renders the confirm button as a destructive action; defaults to \"default\""
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"functions": []
|
|
71
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behivetech/molecules.confirm-dialog",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"description": "A `Modal` pre-wired with a message and confirm/cancel actions, for \"are you sure?\" moments such as confirming a delete.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"private": false,
|
|
7
8
|
"exports": {
|
|
@@ -26,8 +27,8 @@
|
|
|
26
27
|
"tags": []
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@behivetech/atoms.button": "0.4.
|
|
30
|
-
"@behivetech/atoms.modal": "0.2.
|
|
30
|
+
"@behivetech/atoms.button": "0.4.4",
|
|
31
|
+
"@behivetech/atoms.modal": "0.2.4"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
34
|
"react": "^19.2.7",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"url": "https://github.com/behivetech/bht-galaxy.git",
|
|
49
50
|
"directory": "registry/behivetech/molecules/confirm-dialog"
|
|
50
51
|
},
|
|
52
|
+
"homepage": "https://bht-galaxy.vercel.app/behivetech/molecules/confirm-dialog",
|
|
51
53
|
"publishConfig": {
|
|
52
54
|
"registry": "https://registry.npmjs.org",
|
|
53
55
|
"access": "public",
|