@centreon/ui 24.4.1-MON-21278-Delete-a-basic-token.11 → 24.4.1-MON-34415-package-centreon-web-debian-12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "24.4.1-MON-21278-Delete-a-basic-token.11",
3
+ "version": "24.4.1-MON-34415-package-centreon-web-debian-12.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
@@ -1,4 +1,4 @@
1
- import { ButtonProps, DialogContentText, Typography } from '@mui/material';
1
+ import { DialogContentText, Typography } from '@mui/material';
2
2
 
3
3
  import Dialog, { Props as DialogProps } from '..';
4
4
 
@@ -6,23 +6,15 @@ type Props = DialogProps & {
6
6
  children?: JSX.Element;
7
7
  labelMessage?: string | null;
8
8
  labelSecondMessage?: string | null;
9
- restCancelButtonProps?: ButtonProps;
10
- restConfirmButtonProps?: ButtonProps;
11
9
  };
12
10
 
13
11
  const Confirm = ({
14
12
  labelMessage,
15
13
  labelSecondMessage,
16
14
  children,
17
- restCancelButtonProps,
18
- restConfirmButtonProps,
19
15
  ...rest
20
16
  }: Props): JSX.Element => (
21
- <Dialog
22
- restCancelButtonProps={restCancelButtonProps}
23
- restConfirmButtonProps={restConfirmButtonProps}
24
- {...rest}
25
- >
17
+ <Dialog {...rest}>
26
18
  <DialogContentText>
27
19
  {labelMessage && <Typography>{labelMessage}</Typography>}
28
20
  {labelSecondMessage && <Typography>{labelSecondMessage}</Typography>}
@@ -9,8 +9,7 @@ import {
9
9
  DialogContent,
10
10
  DialogActions,
11
11
  DialogProps,
12
- CircularProgress,
13
- ButtonProps
12
+ CircularProgress
14
13
  } from '@mui/material';
15
14
 
16
15
  import { DataTestAttributes } from '../@types/data-attributes';
@@ -49,8 +48,6 @@ export type Props = {
49
48
  onClose?: () => void;
50
49
  onConfirm: (event, value?) => void;
51
50
  open: boolean;
52
- restCancelButtonProps?: ButtonProps;
53
- restConfirmButtonProps?: ButtonProps;
54
51
  submitting?: boolean;
55
52
  } & DialogProps &
56
53
  DataTestAttributes;
@@ -73,8 +70,6 @@ const Dialog = ({
73
70
  dialogContentClassName,
74
71
  dialogActionsClassName,
75
72
  dialogConfirmButtonClassName,
76
- restCancelButtonProps,
77
- restConfirmButtonProps,
78
73
  ...rest
79
74
  }: Props): JSX.Element => {
80
75
  const { classes, cx } = useStyles({ contentWidth });
@@ -106,7 +101,6 @@ const Dialog = ({
106
101
  data-testid="Cancel"
107
102
  disabled={cancelDisabled}
108
103
  onClick={onCancel}
109
- {...restCancelButtonProps}
110
104
  >
111
105
  {labelCancel}
112
106
  </Button>
@@ -119,7 +113,6 @@ const Dialog = ({
119
113
  disabled={confirmDisabled}
120
114
  endIcon={submitting && <CircularProgress size={15} />}
121
115
  onClick={onConfirm}
122
- {...restConfirmButtonProps}
123
116
  >
124
117
  {labelConfirm}
125
118
  </Button>