cozy-ui 128.4.0 → 128.5.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [128.5.0](https://github.com/cozy/cozy-ui/compare/v128.4.0...v128.5.0) (2025-09-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **ConfirmDialogProviders:** Expose method to close the dialog ([7d3d841](https://github.com/cozy/cozy-ui/commit/7d3d841))
|
|
7
|
+
|
|
1
8
|
# [128.4.0](https://github.com/cozy/cozy-ui/compare/v128.3.5...v128.4.0) (2025-09-04)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import ConfirmDialogProvider, { useConfirmDialog } from 'cozy-ui/transpiled/reac
|
|
|
4
4
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
5
|
|
|
6
6
|
const Component = () => {
|
|
7
|
-
const { showConfirmDialog } = useConfirmDialog()
|
|
7
|
+
const { showConfirmDialog, closeConfirmDialog } = useConfirmDialog()
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
10
|
<Button
|
|
@@ -13,7 +13,12 @@ const Component = () => {
|
|
|
13
13
|
showConfirmDialog({
|
|
14
14
|
title: "Title of the ConfirmDialog",
|
|
15
15
|
content: "Content of the ConfirmDialog",
|
|
16
|
-
actions:
|
|
16
|
+
actions: (
|
|
17
|
+
<>
|
|
18
|
+
<Button label="Cancel" variant="secondary" onClick={closeConfirmDialog} />
|
|
19
|
+
<Button label="Ok" />
|
|
20
|
+
</>
|
|
21
|
+
)
|
|
17
22
|
})
|
|
18
23
|
}
|
|
19
24
|
/>
|
|
@@ -55,9 +55,10 @@ var ConfirmDialogProvider = function ConfirmDialogProvider(_ref) {
|
|
|
55
55
|
setState(_objectSpread({
|
|
56
56
|
open: true
|
|
57
57
|
}, args));
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
closeConfirmDialog: handleClose(state, setState)
|
|
59
60
|
};
|
|
60
|
-
}, []);
|
|
61
|
+
}, [state]);
|
|
61
62
|
return /*#__PURE__*/React.createElement(ConfirmDialogContext.Provider, {
|
|
62
63
|
value: value
|
|
63
64
|
}, children, open && /*#__PURE__*/React.createElement(ConfirmDialog, _extends({
|