mautourco-components 0.2.158 → 0.2.160

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.
@@ -15,6 +15,10 @@ export interface DialogCancellationListProps {
15
15
  * The cancellations to display.
16
16
  */
17
17
  cancellations: CancellationPolicyItem[];
18
+ /**
19
+ * The callback function to call when the submit button is clicked.
20
+ */
21
+ onSubmit?: () => void;
18
22
  }
19
23
  export declare function CancellationsList(props: DialogCancellationListProps): import("react/jsx-runtime").JSX.Element;
20
24
  /**
@@ -43,5 +43,6 @@ export function CancellationsList(props) {
43
43
  * @returns The DialogCancellationList component.
44
44
  */
45
45
  export function DialogCancellationList(props) {
46
- return (_jsx(DialogContentPolicy, { children: _jsx(CancellationsList, __assign({}, props)) }));
46
+ var cancellations = props.cancellations, onSubmit = props.onSubmit;
47
+ return (_jsx(DialogContentPolicy, { onSubmit: onSubmit, children: _jsx(CancellationsList, { cancellations: cancellations }) }));
47
48
  }
@@ -12,6 +12,10 @@ export interface BookingCancellationPolicyProps {
12
12
  * The cancellations to display.
13
13
  */
14
14
  cancellations: CancellationPolicyItem[];
15
+ /**
16
+ * The callback function to call when the submit button is clicked.
17
+ */
18
+ onSubmit?: () => void;
15
19
  }
16
20
  /**
17
21
  * BookingCancellationPolicy is a component that allows the user to display the booking cancellation policy.
@@ -15,6 +15,6 @@ import { DialogBookingConfirm } from './DialogBookingConfirm';
15
15
  * @returns The BookingCancellationPolicy component.
16
16
  */
17
17
  export function BookingCancellationPolicy(props) {
18
- var open = props.open, setOpen = props.setOpen, cancellations = props.cancellations;
19
- return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: "Confirmation of Terms & Cancellation policy", className: "!max-w-[800px]", children: _jsx(DialogContentPolicy.List, { cancellations: cancellations }) }));
18
+ var open = props.open, setOpen = props.setOpen, cancellations = props.cancellations, onSubmit = props.onSubmit;
19
+ return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: "Confirmation of Terms & Cancellation policy", className: "!max-w-[800px]", children: _jsx(DialogContentPolicy.List, { cancellations: cancellations, onSubmit: onSubmit }) }));
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.158",
3
+ "version": "0.2.160",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Mautourco pour le redesign",
6
6
  "main": "dist/index.js",
@@ -24,6 +24,10 @@ export interface DialogCancellationListProps {
24
24
  * The cancellations to display.
25
25
  */
26
26
  cancellations: CancellationPolicyItem[];
27
+ /**
28
+ * The callback function to call when the submit button is clicked.
29
+ */
30
+ onSubmit?: () => void;
27
31
  }
28
32
 
29
33
  const isAccommodation = (
@@ -67,9 +71,10 @@ export function CancellationsList(props: DialogCancellationListProps) {
67
71
  * @returns The DialogCancellationList component.
68
72
  */
69
73
  export function DialogCancellationList(props: DialogCancellationListProps) {
74
+ const { cancellations, onSubmit } = props;
70
75
  return (
71
- <DialogContentPolicy>
72
- <CancellationsList {...props} />
76
+ <DialogContentPolicy onSubmit={onSubmit}>
77
+ <CancellationsList cancellations={cancellations} />
73
78
  </DialogContentPolicy>
74
79
  );
75
80
  }
@@ -15,6 +15,10 @@ export interface BookingCancellationPolicyProps {
15
15
  * The cancellations to display.
16
16
  */
17
17
  cancellations: CancellationPolicyItem[];
18
+ /**
19
+ * The callback function to call when the submit button is clicked.
20
+ */
21
+ onSubmit?: () => void;
18
22
  }
19
23
 
20
24
  /**
@@ -31,14 +35,14 @@ export interface BookingCancellationPolicyProps {
31
35
  * @returns The BookingCancellationPolicy component.
32
36
  */
33
37
  export function BookingCancellationPolicy(props: BookingCancellationPolicyProps) {
34
- const { open, setOpen, cancellations } = props;
38
+ const { open, setOpen, cancellations, onSubmit } = props;
35
39
  return (
36
40
  <DialogBookingConfirm
37
41
  open={open}
38
42
  setOpen={setOpen}
39
43
  title="Confirmation of Terms & Cancellation policy"
40
44
  className="!max-w-[800px]">
41
- <DialogContentPolicy.List cancellations={cancellations} />
45
+ <DialogContentPolicy.List cancellations={cancellations} onSubmit={onSubmit} />
42
46
  </DialogBookingConfirm>
43
47
  );
44
48
  }