oa-componentbook 0.17.1 → 0.17.2
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.
|
@@ -22,16 +22,20 @@ function App() {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
<CustomButton
|
|
26
|
+
label="trigger notification"
|
|
27
|
+
onClick={() => myRef.current.openNotification({
|
|
28
|
+
description: 'Notification description HERE',
|
|
29
|
+
title: 'Notification title HERE',
|
|
30
|
+
type: 'Failure',
|
|
31
|
+
})}
|
|
32
|
+
/>
|
|
33
|
+
<CustomNotification
|
|
28
34
|
onClick={onClick}
|
|
29
35
|
onClose={onClose}
|
|
30
36
|
placement="bottomLeft"
|
|
31
37
|
ref={myRef}
|
|
32
|
-
|
|
33
|
-
type="failure"
|
|
34
|
-
/>
|
|
38
|
+
/>
|
|
35
39
|
</>
|
|
36
40
|
);
|
|
37
41
|
}
|
|
@@ -41,8 +41,12 @@ function CloseClaim(_ref) {
|
|
|
41
41
|
}, []);
|
|
42
42
|
const handleConfirm = () => {
|
|
43
43
|
form.validateFields().then(values => {
|
|
44
|
+
// Passing up the form data to the parent using the provided callback.
|
|
44
45
|
onConfirm(values);
|
|
45
46
|
});
|
|
47
|
+
|
|
48
|
+
// This resets the form upon confirm.
|
|
49
|
+
form.resetFields();
|
|
46
50
|
};
|
|
47
51
|
const handleCancel = () => {
|
|
48
52
|
onCancel();
|